1.3 |
| 21-Sep-2024 |
kre | In !TINYPROG versions of sh, make the builtin "shift" builtin command perform a rotate instead or shift if given a numeric arg (which is otherwise an error).
"set -- a b c; shift -1; echo $*" will echo "c a b".
While here, make the shift builtin comply with POSIX, and accept (and ignore) a '--' arg before the shift (or rotate) count.
Document the variant of shift in sh(1)
Adapt the shell test for shift to not expect "shift -1" to be an error, test that rotate works as expected, and include some tests that use the (useless, but required) "--" arg.
|