1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-01 21:51:40 +02:00

42209: take account of numeric options such as -4 instead of -t4

This commit is contained in:
dana 2018-01-03 15:29:52 -06:00 committed by Oliver Kiddle
parent 9f8ed99146
commit 5f68531b5d
2 changed files with 7 additions and 0 deletions

View file

@ -1,5 +1,8 @@
2018-01-03 Oliver Kiddle <okiddle@yahoo.co.uk>
* dana: 42209: Completion/Unix/Command/_unexpand: take account
of numeric options such as -4 instead of -t4
* dana: 42209: Completion/Unix/Command/_tr: fix option
descriptions for non-GNU variants

View file

@ -28,6 +28,10 @@ elif [[ $OSTYPE = (*bsd*|dragonfly*|darwin*) ]]; then
fi
[[ $service = *un* ]] && args+=( "(--all --help --version)-a[$all]" )
# Most (un)expand variants, excluding BusyBox, allow e.g. -4 instead of -t4
[[ $_cmd_variant[$service] == *busybox* ]] ||
args+=( '!(-0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -t --tabs)-'{0..9} )
_arguments -s -S "$args[@]" \
"(--tabs --help)-t+${tabs}" \
'*:file:_files'