diff --git a/completions/faillog b/completions/faillog index 3b4a23d07a7..acb74558890 100644 --- a/completions/faillog +++ b/completions/faillog @@ -6,10 +6,10 @@ _faillog() _init_completion -s || return case $prev in - -h|--help|-l|--lock-time|-m|--maximum|-t|--time) + --help|--lock-time|--maximum|--time|-!(-*)[hlmt]) return ;; - -u|--user) + --user|-!(-*)u) COMPREPLY=( $( compgen -u -- "$cur" ) ) return ;; diff --git a/completions/feh b/completions/feh index 1cd75420dd7..3b8fc384dda 100644 --- a/completions/feh +++ b/completions/feh @@ -6,19 +6,19 @@ _feh() _init_completion -s || return case "$prev" in - -B|--image-bg) + --image-bg|-B) COMPREPLY=( $( compgen -W 'checks white black' -- "$cur" ) ) return ;; - -f|--filelist|-o|--output|-O|--output-only|-\||--start-at) + --filelist|--output|--output-only|--start-at|-!(-*)[foO\|]) _filedir return ;; - -K|--caption-path|-C|--fontpath|-j|--output-dir) + --caption-path|--fontpath|--output-dir|-!(-*)[KCj]) _filedir -d return ;; - -e|--font|-M|--menu-font|-@|--title-font) + --font|--menu-font|--title-font|-!(-*)[eM@]) # expect string like "dejavu.ttf/12" if [[ "$cur" == */* ]]; then # expect integer value COMPREPLY=( $( compgen -P "$cur" -W '{0..9}' ) ) @@ -39,7 +39,7 @@ _feh() compopt -o nospace return ;; - -T|--theme) + --theme|-!(-*)T) local conf_path=~/.config/feh/themes local theme_name theme_opts [[ -r $conf_path ]] || return @@ -51,13 +51,13 @@ _feh() done < "$conf_path" return ;; - -S|--sort) + --sort|-!(-*)S) COMPREPLY=( $( compgen -W 'name filename mtime width height pixels size format' -- "$cur" ) ) return ;; - -R|--reload|-H|--limit-height|-W|--limit-width|-E|--thumb-height|\ - -y|--thumb-width|-J|--thumb-redraw|--magick-timeout) + --reload|--limit-height|--limit-width|--thumb-height|--thumb-width|\ + --thumb-redraw|--magick-timeout|-!(-*)[RHWEyJ]) # expect integer value COMPREPLY+=( $( compgen -W '{0..9}' ) ) compopt -o nospace @@ -72,16 +72,16 @@ _feh() fi return ;; - -a|--alpha) + --alpha|-!(-*)a) COMPREPLY=( $( compgen -W '{0..255}' -- "$cur" ) ) return ;; - -b|--bg) + --bg|-!(-*)b) _filedir COMPREPLY+=( $( compgen -W 'trans' -- "$cur" ) ) return ;; - -g|--geometry|--max-dimension|--min-dimension) + --geometry|--max-dimension|--min-dimension|-!(-*)g) # expect string like 640x480 if [[ $cur && "$cur" != *x* ]]; then COMPREPLY=( x ) @@ -90,8 +90,8 @@ _feh() compopt -o nospace return ;; - -L|--customlist|--index-info|--info|-D|--slideshow-delay|-~|\ - --thumb-title|-^|--title) + --customlist|--index-info|--info|--slideshow-delay|--thumb-title|\ + --title|-!(-*)[LD~^]) # argument required but no completions available return ;; diff --git a/completions/file b/completions/file index f3f6df881aa..558273c0d64 100644 --- a/completions/file +++ b/completions/file @@ -6,14 +6,14 @@ _file() _init_completion || return case $prev in - --help|-v|--version|-F|--separator) + --help|--version|--separator|-!(-*)[vF]) return ;; - -m|--magic-file|-f|--files-from) + --magic-file|--files-from|-!(-*)[mf]) _filedir return ;; - -e|--exclude) + --exclude|-!(-*)e) COMPREPLY=( $( compgen -W 'apptype ascii cdf compress elf encoding soft tar text tokens troff' -- "$cur" ) ) return diff --git a/completions/file-roller b/completions/file-roller index efa73bb17ac..ef7b6ac74e1 100644 --- a/completions/file-roller +++ b/completions/file-roller @@ -8,19 +8,19 @@ _file_roller() local exts='@(7z|ace|alz|ar|arj|[bglx]z|bz2|tb?(z)2|cab|cb[rz]|iso?(9660)|Z|t[abglx]z|cpio|deb|rar|?(g)tar|gem|lh[az]|lz[4h]|?(t)lrz|lzma|lzo|wim|swm|rpm|sit|zoo)' case $prev in - -'?'|--help|--help-all|--help-gtk|--help-sm-client) + --help|--help-all|--help-gtk|--help-sm-client|-!(-*)'?') return ;; --sm-client-state-file) _filedir return ;; - -a|--add-to) + --add-to|-!(-*)a) _filedir_xspec unzip _filedir "$exts" return ;; - -e|--extract-to|--default-dir) + --extract-to|--default-dir|-!(-*)e) _filedir -d return ;; diff --git a/completions/flake8 b/completions/flake8 index 6f0be12f324..37fce9eb212 100644 --- a/completions/flake8 +++ b/completions/flake8 @@ -6,14 +6,14 @@ _flake8() _init_completion -s || return case $prev in - -h|--help|--version) + --help|--version|-!(-*)h) return ;; --format) COMPREPLY=( $( compgen -W 'default pylint' -- "$cur" ) ) return ;; - -j|--jobs) + --jobs|-!(-*)j) COMPREPLY=( $( compgen -W "auto {1..$(_ncpus)}" -- "$cur" ) ) return ;; diff --git a/completions/fusermount b/completions/fusermount index 23671bd67a5..ba42b1d6e94 100644 --- a/completions/fusermount +++ b/completions/fusermount @@ -6,10 +6,10 @@ _fusermount() _init_completion || return case $prev in - -h|-V|-o) + -*[hVo]) return ;; - -u) + -*u) COMPREPLY=( $( compgen -W "$( awk \ '{ if ($3 ~ /^fuse(\.|$)/) print $2 }' /etc/mtab \ 2>/dev/null )" -- "$cur" ) )