summaryrefslogtreecommitdiff
path: root/completions/lrzip
diff options
context:
space:
mode:
Diffstat (limited to 'completions/lrzip')
-rw-r--r--completions/lrzip25
1 files changed, 12 insertions, 13 deletions
diff --git a/completions/lrzip b/completions/lrzip
index 5338bd87..5eb2445b 100644
--- a/completions/lrzip
+++ b/completions/lrzip
@@ -8,36 +8,36 @@ _lrzip()
local xspec="*.lrz"
case $prev in
- -w|-S|-V|-h|-'?'|-m)
+ -*@([wSm]|[Vh?]*))
return
;;
- -d)
+ -*d)
xspec="!"$xspec
;;
- -o)
+ -*o)
_filedir
return
;;
- -O)
+ -*O)
_filedir -d
return
;;
- -L)
- COMPREPLY=( $( compgen -W '{1..9}' -- "$cur" ) )
+ -*L)
+ COMPREPLY=( $(compgen -W '{1..9}' -- "$cur") )
return
;;
- -N)
- COMPREPLY=( $( compgen -W '{-20..19}' -- "$cur" ) )
+ -*N)
+ COMPREPLY=( $(compgen -W '{-20..19}' -- "$cur") )
return
;;
- -p)
- COMPREPLY=( $( compgen -W "{1..$(_ncpus)}" -- "$cur" ) )
+ -*p)
+ COMPREPLY=( $(compgen -W "{1..$(_ncpus)}" -- "$cur") )
return
;;
esac
if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") )
return
fi
@@ -45,8 +45,7 @@ _lrzip()
local IFS=$'\n'
compopt -o filenames
- COMPREPLY=( $( compgen -f -X "$xspec" -- "$cur" ) \
- $( compgen -d -- "$cur" ) )
+ COMPREPLY=( $(compgen -f -X "$xspec" -- "$cur") $(compgen -d -- "$cur") )
} &&
complete -F _lrzip lrzip