From 5f68531b5d8b1e6262f34e91bf047909f12dfeb2 Mon Sep 17 00:00:00 2001 From: dana Date: Wed, 3 Jan 2018 15:29:52 -0600 Subject: 42209: take account of numeric options such as -4 instead of -t4 --- Completion/Unix/Command/_unexpand | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Completion') diff --git a/Completion/Unix/Command/_unexpand b/Completion/Unix/Command/_unexpand index 13f6ce835..b548b3c3a 100644 --- a/Completion/Unix/Command/_unexpand +++ b/Completion/Unix/Command/_unexpand @@ -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' -- cgit 1.4.1