Home | History | Annotate | Download | only in sh
History log of /src/tests/bin/sh/t_shift.sh
RevisionDateAuthorComments
 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.
 1.2  17-May-2016  kre branches: 1.2.28;

Use valid (standard) shell syntax, in anticipation of /bin/sh enforcing
it sometime soon (perhaps.)
 1.1  08-Mar-2016  christos Tests for the shift builtin (from kre)
 1.2.28.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed