summaryrefslogtreecommitdiffhomepage
path: root/tests/zash/param-len-at.sh
blob: bbdb422f78bfdee5cc25d9d9a8db4f00299a8010 (plain)
1
2
3
4
5
6
# shellcheck disable=SC2016
# "${#@}" and "${#*}" count the parameters, like ksh and bash; dash gives the
# length of "$*" instead, so this is zash's own choice.
"$TSH" -c 'set -- a bb c; echo "${#@} ${#*} $#"'
"$TSH" -c 'echo "${#@}"'
"$TSH" -c 'set -- a b; x="@"; echo "${#@}"'