Convert many completions to use _parse_help() instead of hardcoded option lists.
This commit is contained in:
parent
393ab1f650
commit
e2c57c5966
@ -63,13 +63,7 @@ _mock()
|
|||||||
$split && return 0
|
$split && return 0
|
||||||
|
|
||||||
if [[ "$cur" == -* ]] ; then
|
if [[ "$cur" == -* ]] ; then
|
||||||
COMPREPLY=( $( compgen -W '--version --help --rebuild --buildsrpm
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
--shell --chroot --clean --init --installdeps --install --update
|
|
||||||
--orphanskill --copyin --copyout --root --offline --no-clean
|
|
||||||
--cleanup-after --no-cleanup-after --arch --target --define --with
|
|
||||||
--without --resultdir --uniqueext --configdir --rpmbuild_timeout
|
|
||||||
--unpriv --cwd --spec --sources --verbose --quiet --trace
|
|
||||||
--enable-plugin --disable-plugin --print-root-path' -- "$cur" ) )
|
|
||||||
else
|
else
|
||||||
_filedir '@(?(no)src.r|s)pm'
|
_filedir '@(?(no)src.r|s)pm'
|
||||||
fi
|
fi
|
||||||
|
@ -139,11 +139,7 @@ _yum()
|
|||||||
$split && return 0
|
$split && return 0
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--help --tolerant -C -c -R -d \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
--showduplicates -e --quiet --verbose -y --version --installroot \
|
|
||||||
--enablerepo --disablerepo --exclude --disableexcludes --obsoletes \
|
|
||||||
--noplugins --nogpgcheck --disableplugin --enableplugin \
|
|
||||||
--skip-broken --color' -- $cur ) )
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
} &&
|
} &&
|
||||||
|
@ -13,8 +13,7 @@ _repomanage()
|
|||||||
[[ "$prev" == -@(h|-help|k|-keep) ]] && return 0
|
[[ "$prev" == -@(h|-help|k|-keep) ]] && return 0
|
||||||
|
|
||||||
if [[ "$cur" == -* ]] ; then
|
if [[ "$cur" == -* ]] ; then
|
||||||
COMPREPLY=( $( compgen -W '--old --new --space \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
--keep --nocheck --help' -- "$cur" ) )
|
|
||||||
else
|
else
|
||||||
_filedir -d
|
_filedir -d
|
||||||
fi
|
fi
|
||||||
|
@ -30,11 +30,7 @@ _ant()
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-help -projecthelp -version -diagnostics \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
-quiet -verbose -debug -emacs -lib -logfile -logger -listener \
|
|
||||||
-noinput -buildfile -D -keep-going -propertyfile -inputhandler \
|
|
||||||
-find -s -nice -nouserlib -noclasspath -autoproxy -main' \
|
|
||||||
-- "$cur" ) )
|
|
||||||
else
|
else
|
||||||
# available targets completion
|
# available targets completion
|
||||||
# find which buildfile to use
|
# find which buildfile to use
|
||||||
|
@ -58,7 +58,7 @@ _hcitool()
|
|||||||
_get_first_arg
|
_get_first_arg
|
||||||
if [ -z $arg ]; then
|
if [ -z $arg ]; then
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--help -i' -- "$cur" ) )
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
else
|
else
|
||||||
COMPREPLY=( $( compgen -W 'dev inq scan name info \
|
COMPREPLY=( $( compgen -W 'dev inq scan name info \
|
||||||
spinq epinq cmd con cc dc sr cpt rssi lq tpl \
|
spinq epinq cmd con cc dc sr cpt rssi lq tpl \
|
||||||
@ -132,7 +132,7 @@ _sdptool()
|
|||||||
_get_first_arg
|
_get_first_arg
|
||||||
if [ -z $arg ]; then
|
if [ -z $arg ]; then
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--help' -- "$cur" ) )
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
else
|
else
|
||||||
COMPREPLY=( $( compgen -W 'search browse records add \
|
COMPREPLY=( $( compgen -W 'search browse records add \
|
||||||
del get setattr setseq' -- "$cur" ) )
|
del get setattr setseq' -- "$cur" ) )
|
||||||
@ -213,8 +213,7 @@ _rfcomm()
|
|||||||
_get_first_arg
|
_get_first_arg
|
||||||
if [ -z $arg ]; then
|
if [ -z $arg ]; then
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--help -a --raw \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
--config -i --auth --encrypt --secure --master' -- "$cur" ) )
|
|
||||||
else
|
else
|
||||||
COMPREPLY=( $( compgen -W 'show connect listen watch \
|
COMPREPLY=( $( compgen -W 'show connect listen watch \
|
||||||
bind release' -- "$cur" ) )
|
bind release' -- "$cur" ) )
|
||||||
@ -253,7 +252,7 @@ _ciptool()
|
|||||||
_get_first_arg
|
_get_first_arg
|
||||||
if [ -z $arg ]; then
|
if [ -z $arg ]; then
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--help -i' -- "$cur" ) )
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
else
|
else
|
||||||
COMPREPLY=( $( compgen -W 'show search connect release \
|
COMPREPLY=( $( compgen -W 'show search connect release \
|
||||||
loopback' -- "$cur" ) )
|
loopback' -- "$cur" ) )
|
||||||
@ -284,7 +283,7 @@ _dfutool()
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--help --device' -- "$cur" ) )
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
else
|
else
|
||||||
local args
|
local args
|
||||||
_count_args
|
_count_args
|
||||||
|
5
completions/configure
vendored
5
completions/configure
vendored
@ -28,10 +28,7 @@ _configure()
|
|||||||
if ($2 ~ /--[A-Za-z]/) print $2 }' | sed -e 's/[[,].*//g' )" \
|
if ($2 ~ /--[A-Za-z]/) print $2 }' | sed -e 's/[[,].*//g' )" \
|
||||||
-- "$cur" ) )
|
-- "$cur" ) )
|
||||||
else
|
else
|
||||||
COMPREPLY=( $( compgen -W "$( $1 --help 2>&1 | \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
awk '/^ --[A-Za-z]/ { print $1; \
|
|
||||||
if ($2 ~ /--[A-Za-z]/) print $2 }' | sed -e 's/[[,=].*//g' )" \
|
|
||||||
-- "$cur" ) )
|
|
||||||
fi
|
fi
|
||||||
} &&
|
} &&
|
||||||
complete -F _configure configure
|
complete -F _configure configure
|
||||||
|
@ -102,8 +102,9 @@ _id()
|
|||||||
_init_completion || return
|
_init_completion || return
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-a -g --group -G --groups -n --name\
|
local opts=$( _parse_help "$1" )
|
||||||
-r --real -u --user --help --version' -- "$cur" ) )
|
[[ $opts ]] || opts="-G -g -u" # POSIX fallback
|
||||||
|
COMPREPLY=( $( compgen -W "$opts" -- "$cur" ) )
|
||||||
else
|
else
|
||||||
COMPREPLY=( $( compgen -u "$cur" ) )
|
COMPREPLY=( $( compgen -u "$cur" ) )
|
||||||
fi
|
fi
|
||||||
@ -133,8 +134,11 @@ _mktemp()
|
|||||||
|
|
||||||
$split && return 0
|
$split && return 0
|
||||||
|
|
||||||
[[ "$cur" == -* ]] && \
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-d -u -q -p -t' -- "$cur" ) )
|
local opts=$( _parse_help "$1" )
|
||||||
|
[[ $opts ]] || opts="-d -u -q -p -t" # non-GNU fallback
|
||||||
|
COMPREPLY=( $( compgen -W "$opts" -- "$cur" ) )
|
||||||
|
fi
|
||||||
} &&
|
} &&
|
||||||
complete -F _mktemp mktemp
|
complete -F _mktemp mktemp
|
||||||
|
|
||||||
|
@ -29,14 +29,9 @@ _cvs_commands()
|
|||||||
cvs --help-commands 2>&1 | awk '/^( *|\t)/ { print $1 }'
|
cvs --help-commands 2>&1 | awk '/^( *|\t)/ { print $1 }'
|
||||||
}
|
}
|
||||||
|
|
||||||
_cvs_options()
|
|
||||||
{
|
|
||||||
cvs --help-options 2>&1 | awk '/^( *|\t)-/ { print $1 }'
|
|
||||||
}
|
|
||||||
|
|
||||||
_cvs_command_options()
|
_cvs_command_options()
|
||||||
{
|
{
|
||||||
cvs --help $1 2>&1 | sed -ne 's/^[[:space:]]*\(-[^[:space:]=[]*\).*/\1/p'
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" "--help $2" )' -- "$cur" ) )
|
||||||
}
|
}
|
||||||
|
|
||||||
_cvs_kflags()
|
_cvs_kflags()
|
||||||
@ -166,8 +161,7 @@ _cvs()
|
|||||||
COMPREPLY=( $( compgen -X '*~' -W '${files[@]}' -- $cur ) )
|
COMPREPLY=( $( compgen -X '*~' -W '${files[@]}' -- $cur ) )
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
COMPREPLY=( $( compgen -W "$( _cvs_command_options $mode )" \
|
_cvs_command_options "$1" $mode
|
||||||
-- "$cur" ) )
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
admin)
|
admin)
|
||||||
@ -186,16 +180,14 @@ _cvs()
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "$cur" = -* ]]; then
|
if [[ "$cur" = -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W "$( _cvs_command_options $mode )" \
|
_cvs_command_options "$1" $mode
|
||||||
-- "$cur" ) )
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
annotate)
|
annotate)
|
||||||
[[ "$prev" == -@(r|D) ]] && return 0
|
[[ "$prev" == -@(r|D) ]] && return 0
|
||||||
|
|
||||||
if [[ "$cur" = -* ]]; then
|
if [[ "$cur" = -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W "$( _cvs_command_options $mode )" \
|
_cvs_command_options "$1" $mode
|
||||||
-- "$cur" ) )
|
|
||||||
else
|
else
|
||||||
get_entries
|
get_entries
|
||||||
COMPREPLY=( $( compgen -W '${entries[@]}' -- "$cur" ) )
|
COMPREPLY=( $( compgen -W '${entries[@]}' -- "$cur" ) )
|
||||||
@ -222,8 +214,7 @@ _cvs()
|
|||||||
awk '{print $1}' ) )
|
awk '{print $1}' ) )
|
||||||
COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- "$cur" ) )
|
COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- "$cur" ) )
|
||||||
else
|
else
|
||||||
COMPREPLY=( $( compgen -W "$( _cvs_command_options $mode )" \
|
_cvs_command_options "$1" $mode
|
||||||
-- "$cur" ) )
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
commit)
|
commit)
|
||||||
@ -258,8 +249,7 @@ _cvs()
|
|||||||
COMPREPLY=( $(compgen -o default -- "$cur") )
|
COMPREPLY=( $(compgen -o default -- "$cur") )
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
COMPREPLY=( $( compgen -W "$( _cvs_command_options $mode )" \
|
_cvs_command_options "$1" $mode
|
||||||
-- "$cur" ) )
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
cvsroot)
|
cvsroot)
|
||||||
@ -287,8 +277,7 @@ _cvs()
|
|||||||
COMPREPLY=( $( cvs -d "$cvsroot" co -c | awk '{print $1}' ) )
|
COMPREPLY=( $( cvs -d "$cvsroot" co -c | awk '{print $1}' ) )
|
||||||
COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- "$cur" ) )
|
COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- "$cur" ) )
|
||||||
else
|
else
|
||||||
COMPREPLY=( $( compgen -W "$( _cvs_command_options $mode )" \
|
_cvs_command_options "$1" $mode
|
||||||
-- "$cur" ) )
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
diff)
|
diff)
|
||||||
@ -311,8 +300,7 @@ _cvs()
|
|||||||
COMPREPLY=( $(compgen -W '${miss[@]:-}' -- "$cur") )
|
COMPREPLY=( $(compgen -W '${miss[@]:-}' -- "$cur") )
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
COMPREPLY=( $( compgen -W "$( _cvs_command_options $mode )" \
|
_cvs_command_options "$1" $mode
|
||||||
-- "$cur" ) )
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
import)
|
import)
|
||||||
@ -339,8 +327,7 @@ _cvs()
|
|||||||
pwd=${pwd##*/}
|
pwd=${pwd##*/}
|
||||||
COMPREPLY=( $( compgen -W '${COMPREPLY[@]} $pwd' -- $cur ) )
|
COMPREPLY=( $( compgen -W '${COMPREPLY[@]} $pwd' -- $cur ) )
|
||||||
else
|
else
|
||||||
COMPREPLY=( $( compgen -W "$( _cvs_command_options $mode )" \
|
_cvs_command_options "$1" $mode
|
||||||
-- "$cur" ) )
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
update)
|
update)
|
||||||
@ -355,8 +342,7 @@ _cvs()
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "$cur" = -* ]]; then
|
if [[ "$cur" = -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W "$( _cvs_command_options $mode )" \
|
_cvs_command_options "$1" $mode
|
||||||
-- "$cur" ) )
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"")
|
"")
|
||||||
@ -374,7 +360,8 @@ _cvs()
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
COMPREPLY=( $( compgen -W '$( _cvs_commands ) $( _cvs_options ) \
|
COMPREPLY=( $( compgen -W '$( _cvs_commands ) \
|
||||||
|
$( _parse_help "$1" --help-options ) \
|
||||||
--help --help-commands --help-options --version' -- "$cur" ) )
|
--help --help-commands --help-options --version' -- "$cur" ) )
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -50,10 +50,7 @@ _cvsps()
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "$cur" == -* ]] ; then
|
if [[ "$cur" == -* ]] ; then
|
||||||
COMPREPLY=( $( compgen -W '-h -x -u -z -g -s -a -f -d -b -l -r -p -v \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" -h )' -- "$cur" ) )
|
||||||
-t --norc --summary-first --test-log --diff-opts --bkcvs --no-rlog \
|
|
||||||
--cvs-direct --no-cvs-direct --debuglvl -Z --root -q -A' \
|
|
||||||
-- "$cur" ) )
|
|
||||||
else
|
else
|
||||||
declare -F _cvs_roots &>/dev/null && _cvs_roots
|
declare -F _cvs_roots &>/dev/null && _cvs_roots
|
||||||
fi
|
fi
|
||||||
|
@ -23,7 +23,7 @@ _dd()
|
|||||||
|
|
||||||
_expand || return 0
|
_expand || return 0
|
||||||
|
|
||||||
COMPREPLY=( $( compgen -W '--help --version' -- "$cur" ) \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) \
|
||||||
$( compgen -W 'bs cbs conv count ibs if obs of seek skip' \
|
$( compgen -W 'bs cbs conv count ibs if obs of seek skip' \
|
||||||
-S '=' -- "$cur" ) )
|
-S '=' -- "$cur" ) )
|
||||||
} &&
|
} &&
|
||||||
|
@ -35,10 +35,7 @@ _gkrellm()
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--theme --geometry --wm --m2 --nt \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
--withdrawn --config --force-host-config --server --port --nc \
|
|
||||||
--config-clean --nolock --plugin --demo --logfile --version \
|
|
||||||
--debug-level --help' -- "$cur" ) )
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
} &&
|
} &&
|
||||||
|
@ -29,9 +29,7 @@ _iconv()
|
|||||||
$split && return 0
|
$split && return 0
|
||||||
|
|
||||||
if [[ "$cur" = -* ]]; then
|
if [[ "$cur" = -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--from-code --to-code --list -c
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
--unicode-subst --byte-subst --widechar-subst --output --silent
|
|
||||||
--verbose --help --usage --version' -- "$cur" ) )
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
} &&
|
} &&
|
||||||
|
@ -21,8 +21,7 @@ _iftop()
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
COMPREPLY=( $( compgen -W '-h -n -N -p -P -b -B -i -f -F -c -m' \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" -h )' -- "$cur" ) )
|
||||||
-- "$cur" ) )
|
|
||||||
} &&
|
} &&
|
||||||
complete -F _iftop iftop
|
complete -F _iftop iftop
|
||||||
|
|
||||||
|
@ -136,46 +136,7 @@ _convert()
|
|||||||
_ImageMagick
|
_ImageMagick
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-adaptive-blur -adaptive-resize \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" -help )' -- "$cur" ) )
|
||||||
-adaptive-sharpen -adjoin -affine -alpha -annotate \
|
|
||||||
-antialias -append -attenuate -authenticate \
|
|
||||||
-auto-orient -average -background -bench -bias \
|
|
||||||
-black-point-compensation -black-threshold \
|
|
||||||
-blue-primary -blur -border -bordercolor -caption \
|
|
||||||
-channel -charcoal -chop -clip -clip-mask -clip-path \
|
|
||||||
-clone -clut -coalesce -colorize -colors -colorspace \
|
|
||||||
-combine -comment -compose -composite -compress \
|
|
||||||
-contrast -contrast-stretch -convolve -crop -cycle \
|
|
||||||
-debug -decipher -deconstruct -define -delay -delete \
|
|
||||||
-density -depth -despeckle -display -dispose -distort \
|
|
||||||
-dither -draw -edge -emboss -encipher -encoding \
|
|
||||||
-endian -enhance -equalize -evaluate -extent -extract \
|
|
||||||
-family -fill -filter -flatten -flip -floodfill -flop \
|
|
||||||
-font -format -frame -fuzz -fx -gamma -gaussian-blur \
|
|
||||||
-geometry -gravity -green-primary -help -identify \
|
|
||||||
-implode -insert -intent -interlace -interpolate \
|
|
||||||
-label -lat -layers -level -limit -linear-stretch \
|
|
||||||
-liquid-rescale -list -log -loop -map -mask \
|
|
||||||
-mattecolor -median -modulate -monitor -monochrome \
|
|
||||||
-morph -mosaic -motion-blur -negate -noise -normalize \
|
|
||||||
-opaque -ordered-dither -orient -page -paint -ping \
|
|
||||||
-pointsize -polaroid -posterize -preview -print \
|
|
||||||
-process -profile -quality -quantize -quiet \
|
|
||||||
-radial-blur -raise -random-threshold -recolor \
|
|
||||||
-red-primary -regard-warnings -region -render -repage \
|
|
||||||
-resample -resize -respect-parenthesis -reverse -roll \
|
|
||||||
-rotate -sample -sampling-factor -scale -scene -seed \
|
|
||||||
-segment -separate -sepia-tone -set -shade -shadow \
|
|
||||||
-sharpen -shave -shear -sigmoidal-contrast -size \
|
|
||||||
-sketch -solarize -splice -spread -stretch -strip \
|
|
||||||
-stroke -strokewidth -style -swap -swirl -taint \
|
|
||||||
-texture -threshold -thumbnail -tile -tile-offset \
|
|
||||||
-tint -transform -transparent -transparent-color \
|
|
||||||
-transpose -transverse -treedepth -trim -type \
|
|
||||||
-undercolor -unique-colors -units -unsharp -verbose \
|
|
||||||
-version -view -vignette -virtual-pixel -wave \
|
|
||||||
-weight -white-point -white-threshold \
|
|
||||||
-write' -- "$cur" ) )
|
|
||||||
elif [[ "$cur" == +* ]]; then
|
elif [[ "$cur" == +* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '+adjoin +append +compress \
|
COMPREPLY=( $( compgen -W '+adjoin +append +compress \
|
||||||
+contrast +debug +dither +endian +gamma +label +map \
|
+contrast +debug +dither +endian +gamma +label +map \
|
||||||
@ -195,42 +156,7 @@ _mogrify()
|
|||||||
_ImageMagick
|
_ImageMagick
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-adaptive-blur -adaptive-resize \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" -help )' -- "$cur" ) )
|
||||||
-adaptive-sharpen -adjoin -affine -alpha -annotate \
|
|
||||||
-antialias -attenuate -authenticate -auto-orient \
|
|
||||||
-background -bias -black-point-compensation \
|
|
||||||
-black-threshold -blue-primary -blur -border \
|
|
||||||
-bordercolor -caption -channel -charcoal -chop -clip \
|
|
||||||
-clip-mask -clip-path -clut -colorize -colors \
|
|
||||||
-colorspace -comment -compose -compress -contrast \
|
|
||||||
-contrast-stretch -convolve -cycle -debug -decipher \
|
|
||||||
-define -delay -density -depth -despeckle -display \
|
|
||||||
-dispose -distort -dither -draw -edge -emboss \
|
|
||||||
-encipher -encoding -endian -enhance -equalize \
|
|
||||||
-evaluate -extent -extract -family -fill -filter \
|
|
||||||
-flip -floodfill -flop -font -format -frame -fuzz \
|
|
||||||
-gamma -gaussian-blur -geometry -gravity \
|
|
||||||
-green-primary -help -identify -implode -intent \
|
|
||||||
-interlace -interpolate -label -lat -layers -level \
|
|
||||||
-limit -linear-stretch -liquid-rescale -list -log \
|
|
||||||
-loop -mask -mattecolor -median -modulate -monitor \
|
|
||||||
-monochrome -motion-blur -negate -noise -normalize \
|
|
||||||
-opaque -ordered-dither -orient -page -paint -path \
|
|
||||||
-ping -pointsize -polaroid -posterize -preview -print \
|
|
||||||
-profile -quality -quantize -quiet -radial-blur \
|
|
||||||
-raise -random-threshold -recolor -red-primary \
|
|
||||||
-regard-warnings -region -render -repage -resample \
|
|
||||||
-resize -roll -rotate -sample -sampling-factor -scale \
|
|
||||||
-scene -seed -segment -sepia-tone -set -shade -shadow \
|
|
||||||
-sharpen -shave -shear -sigmoidal-contrast -size \
|
|
||||||
-sketch -solarize -splice -spread -stretch -strip \
|
|
||||||
-stroke -strokewidth -style -swirl -taint -texture \
|
|
||||||
-threshold -thumbnail -tile -tile-offset -tint \
|
|
||||||
-transform -transparent -transparent-color -transpose \
|
|
||||||
-transverse -treedepth -trim -type -undercolor \
|
|
||||||
-unique-colors -units -unsharp -verbose -version \
|
|
||||||
-view -vignette -virtual-pixel -wave -weight \
|
|
||||||
-white-point -white-threshold' -- "$cur" ) )
|
|
||||||
elif [[ "$cur" == +* ]]; then
|
elif [[ "$cur" == +* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '+compress +contrast +debug +dither \
|
COMPREPLY=( $( compgen -W '+compress +contrast +debug +dither \
|
||||||
+endian +gamma +label +map +mask +matte +negate +page \
|
+endian +gamma +label +map +mask +matte +negate +page \
|
||||||
@ -249,26 +175,7 @@ _display()
|
|||||||
_ImageMagick
|
_ImageMagick
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-alpha -antialias -authenticate \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" -help )' -- "$cur" ) )
|
||||||
-auto-orient -backdrop -background -border \
|
|
||||||
-bordercolor -borderwidth -channel -clip \
|
|
||||||
-clip-path -coalesce -colormap -colors -colorspace \
|
|
||||||
-comment -compress -contrast -crop -debug -decipher \
|
|
||||||
-define -delay -density -depth -despeckle -display \
|
|
||||||
-dispose -dither -edge -endian -enhance -extract \
|
|
||||||
-filter -flatten -flip -flop -font -foreground \
|
|
||||||
-format -frame -gamma -geometry -help -iconGeometry \
|
|
||||||
-iconic -identify -immutable -interlace -interpolate \
|
|
||||||
-label -limit -list -log -loop -map -mattecolor \
|
|
||||||
-monitor -monochrome -name -negate -page -profile \
|
|
||||||
-quality -quantize -quiet -raise -regard-warnings \
|
|
||||||
-remote -repage -resample -resize \
|
|
||||||
-respect-parenthesis -roll -rotate -sample \
|
|
||||||
-sampling-factor -scenes -seed -segment -set \
|
|
||||||
-shared-memory -sharpen -size -strip -texture -title \
|
|
||||||
-transparent-color -treedepth -trim -update \
|
|
||||||
-usePixmap -verbose -version -virtual-pixel -visual \
|
|
||||||
-window -window-group -write' -- "$cur" ) )
|
|
||||||
elif [[ "$cur" == +* ]]; then
|
elif [[ "$cur" == +* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '+compress +contrast +debug +dither \
|
COMPREPLY=( $( compgen -W '+compress +contrast +debug +dither \
|
||||||
+endian +gamma +label +map +matte +negate +page \
|
+endian +gamma +label +map +matte +negate +page \
|
||||||
@ -287,21 +194,7 @@ _animate()
|
|||||||
_ImageMagick
|
_ImageMagick
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-alpha -authenticate -backdrop \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" -help )' -- "$cur" ) )
|
||||||
-background -bordercolor -borderwidth -channel \
|
|
||||||
-coalesce -colormap -colors -colorspace -crop -debug \
|
|
||||||
-decipher -define -delay -density -depth -display \
|
|
||||||
-dispose -dither -extract -filter -flatten -font \
|
|
||||||
-foreground -format -gamma -geometry -help \
|
|
||||||
-iconGeometry -iconic -identify -immutable -interlace \
|
|
||||||
-interpolate -limit -list -log -loop -map -mattecolor \
|
|
||||||
-mattecolor -monitor -monochrome -name -page -pause \
|
|
||||||
-quantize -quiet -regard-warnings -remote -repage \
|
|
||||||
-resample -resize -respect-parenthesis -rotate \
|
|
||||||
-sampling-factor -scenes -seed -set -shared-memory \
|
|
||||||
-size -strip -title -transparent-color -treedepth \
|
|
||||||
-trim -verbose -version -virtual-pixel -visual \
|
|
||||||
-window' -- "$cur" ) )
|
|
||||||
elif [[ "$cur" == +* ]]; then
|
elif [[ "$cur" == +* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '+debug +dither +gamma +map +matte' \
|
COMPREPLY=( $( compgen -W '+debug +dither +gamma +map +matte' \
|
||||||
-- "$cur" ) )
|
-- "$cur" ) )
|
||||||
@ -319,13 +212,7 @@ _identify()
|
|||||||
_ImageMagick
|
_ImageMagick
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-alpha -antialias -authenticate \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" -help )' -- "$cur" ) )
|
||||||
-channel -colorspace -crop -debug -define -density \
|
|
||||||
-depth -extract -format -fuzz -gamma -help -interlace \
|
|
||||||
-interpolate -limit -list -log -monitor -ping -quiet \
|
|
||||||
-regard-warnings -respect-parenthesis \
|
|
||||||
-sampling-factor -seed -set -size -strip -units \
|
|
||||||
-verbose -version -virtual-pixel' -- "$cur" ) )
|
|
||||||
elif [[ "$cur" == +* ]]; then
|
elif [[ "$cur" == +* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '+debug' -- "$cur" ) )
|
COMPREPLY=( $( compgen -W '+debug' -- "$cur" ) )
|
||||||
else
|
else
|
||||||
@ -342,25 +229,7 @@ _montage()
|
|||||||
_ImageMagick
|
_ImageMagick
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-adjoin -affine -alpha \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" -help )' -- "$cur" ) )
|
||||||
-authenticate -background -blue-primary -blur -border \
|
|
||||||
-bordercolor -borderwidth -caption -channel -clone \
|
|
||||||
-coalesce -colors -colorspace -comment -compose \
|
|
||||||
-compress -crop -debug -define -density -depth \
|
|
||||||
-display -dispose -dither -draw -encoding -endian \
|
|
||||||
-extract -fill -filter -flatten -flip -flop -font \
|
|
||||||
-format -frame -gamma -geometry -gravity \
|
|
||||||
-green-primary -help -identify -interlace \
|
|
||||||
-interpolate -label -limit -list -log -mattecolor \
|
|
||||||
-mode -monitor -monochrome -origin -page -pointsize \
|
|
||||||
-polaroid -profile -quality -quantize -quiet \
|
|
||||||
-red-primary -regard-warnings -repage -resize \
|
|
||||||
-respect-parenthesis -rotate -sampling-factor -scenes \
|
|
||||||
-seed -set -shadow -size -strip -stroke -texture \
|
|
||||||
-thumbnail -tile -title -transform -transparent \
|
|
||||||
-transparent-color -treedepth -trim -type -units \
|
|
||||||
-verbose -version -virtual-pixel \
|
|
||||||
-white-point' -- "$cur" ) )
|
|
||||||
elif [[ "$cur" == +* ]]; then
|
elif [[ "$cur" == +* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '+adjoin +compress +debug +dither \
|
COMPREPLY=( $( compgen -W '+adjoin +compress +debug +dither \
|
||||||
+endian +gamma +label +matte +page' -- "$cur" ) )
|
+endian +gamma +label +matte +page' -- "$cur" ) )
|
||||||
@ -378,22 +247,7 @@ _composite()
|
|||||||
_ImageMagick
|
_ImageMagick
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-affine -alpha -authenticate \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" -help )' -- "$cur" ) )
|
||||||
-blend -blue-primary -border -bordercolor -channel \
|
|
||||||
-colors -colorspace -comment -compose -compress \
|
|
||||||
-debug -decipher -define -density -depth -displace \
|
|
||||||
-display -dispose -dissolve -dither -encipher \
|
|
||||||
-encoding -endian -extract -filter -font -format \
|
|
||||||
-geometry -gravity -green-primary -help -identify \
|
|
||||||
-interlace -interpolate -label -limit -list -log \
|
|
||||||
-monitor -monochrome -negate -page -profile -quality \
|
|
||||||
-quantize -quiet -red-primary -regard-warnings \
|
|
||||||
-repage -resize -respect-parenthesis -rotate \
|
|
||||||
-sampling-factor -scene -seed -sharpen -shave -size \
|
|
||||||
-stegano -stereo -strip -swap -thumbnail -tile \
|
|
||||||
-transform -transparent-color -treedepth -type -units \
|
|
||||||
-unsharp -verbose -version -virtual-pixel -watermark \
|
|
||||||
-white-point -write' -- "$cur" ) )
|
|
||||||
elif [[ "$cur" == +* ]]; then
|
elif [[ "$cur" == +* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '+compress +debug +dither +endian +label \
|
COMPREPLY=( $( compgen -W '+compress +debug +dither +endian +label \
|
||||||
+matte +negate +page +write' -- "$cur" ) )
|
+matte +negate +page +write' -- "$cur" ) )
|
||||||
@ -411,15 +265,7 @@ _compare()
|
|||||||
_ImageMagick
|
_ImageMagick
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-alpha -authenticate -channel \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" -help )' -- "$cur" ) )
|
||||||
-colorspace -compress -debug -decipher -define \
|
|
||||||
-density -depth -encipher -extract -format -fuzz \
|
|
||||||
-help -highlight-color -identify -interlace -limit \
|
|
||||||
-list -log -metric -monitor -passphrase -profile \
|
|
||||||
-quality -quantize -quiet -regard-warnings \
|
|
||||||
-respect-parenthesis -sampling-factor -seed -set \
|
|
||||||
-size -transparent-color -type -verbose -version \
|
|
||||||
-virtual-pixel' -- "$cur" ) )
|
|
||||||
elif [[ "$cur" == +* ]]; then
|
elif [[ "$cur" == +* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '+debug' -- "$cur" ) )
|
COMPREPLY=( $( compgen -W '+debug' -- "$cur" ) )
|
||||||
else
|
else
|
||||||
@ -436,8 +282,7 @@ _conjure()
|
|||||||
_ImageMagick
|
_ImageMagick
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-debug -help -list -log -monitor -quiet \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" -help )' -- "$cur" ) )
|
||||||
-regard-warnings -seed -verbose -version' -- "$cur" ) )
|
|
||||||
elif [[ "$cur" == +* ]]; then
|
elif [[ "$cur" == +* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '+debug' -- "$cur" ) )
|
COMPREPLY=( $( compgen -W '+debug' -- "$cur" ) )
|
||||||
else
|
else
|
||||||
@ -454,19 +299,7 @@ _import()
|
|||||||
_ImageMagick
|
_ImageMagick
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-adjoin -annotate -border -channel \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" -help )' -- "$cur" ) )
|
||||||
-colors -colorspace -comment -compress -crop -debug \
|
|
||||||
-define -delay -density -depth -descend -display \
|
|
||||||
-dispose -dither -encipher -encoding -endian -filter \
|
|
||||||
-format -frame -geometry -gravity -help -identify \
|
|
||||||
-interlace -interpolate -label -limit -list -log \
|
|
||||||
-monitor -monochrome -negate -page -pause -pointsize \
|
|
||||||
-quality -quantize -quiet -regard-warnings -repage \
|
|
||||||
-resize -respect-parenthesis -rotate -sampling-factor \
|
|
||||||
-scene -screen -seed -set -silent -snaps -strip \
|
|
||||||
-thumbnail -transparent -transparent-color -treedepth \
|
|
||||||
-trim -type -verbose -version -virtual-pixel \
|
|
||||||
-window' -- "$cur" ) )
|
|
||||||
elif [[ "$cur" == +* ]]; then
|
elif [[ "$cur" == +* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '+debug' -- "$cur" ) )
|
COMPREPLY=( $( compgen -W '+debug' -- "$cur" ) )
|
||||||
else
|
else
|
||||||
@ -483,13 +316,7 @@ _stream()
|
|||||||
_ImageMagick
|
_ImageMagick
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-authenticate -channel -colorspace \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" -help )' -- "$cur" ) )
|
||||||
-compress -debug -define -density -depth -extract \
|
|
||||||
-help -identify -interlace -interpolate -limit -list \
|
|
||||||
-log -map -monitor -quantize -quiet -regard-warnings \
|
|
||||||
-respect-parenthesis -sampling-factor -seed -set \
|
|
||||||
-size -storage-type -transparent-color -verbose \
|
|
||||||
-version -virtual-pixel' -- "$cur" ) )
|
|
||||||
elif [[ "$cur" == +* ]]; then
|
elif [[ "$cur" == +* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '+debug' -- "$cur" ) )
|
COMPREPLY=( $( compgen -W '+debug' -- "$cur" ) )
|
||||||
else
|
else
|
||||||
|
@ -215,11 +215,7 @@ _java()
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
# standard options
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" -help )' -- "$cur" ) )
|
||||||
COMPREPLY=( $( compgen -W '-client -server -agentlib: -agentpath:
|
|
||||||
-classpath -D -d32 -d64 -enableassertions -disableassertions
|
|
||||||
-enablesystemassertions -disablesystemassertions -jar -javaagent:
|
|
||||||
-verbose -verbose -version -showversion -help -X' -- "$cur" ) )
|
|
||||||
else
|
else
|
||||||
if [[ "$prev" == -jar ]]; then
|
if [[ "$prev" == -jar ]]; then
|
||||||
# jar file completion
|
# jar file completion
|
||||||
@ -263,20 +259,7 @@ _javadoc()
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
# relevant options completion
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" -help )' -- "$cur" ) )
|
||||||
COMPREPLY=( $( compgen -W '-overview -public -protected \
|
|
||||||
-package -private -help -doclet -docletpath \
|
|
||||||
-sourcepath -classpath -exclude -subpackages \
|
|
||||||
-breakiterator -bootclasspath -source -extdirs \
|
|
||||||
-verbose -locale -encoding -J -d -use -version \
|
|
||||||
-author -docfilessubdirs -splitindex \
|
|
||||||
-windowtitle -doctitle -header -footer -bottom \
|
|
||||||
-link -linkoffline -excludedocfilessubdir \
|
|
||||||
-group -nocomment -nodeprecated -noqualifier \
|
|
||||||
-nosince -nodeprecatedlist -notree -noindex \
|
|
||||||
-nohelp -nonavbar -quiet -serialwarn -tag \
|
|
||||||
-taglet -tagletpath -charset -helpfile \
|
|
||||||
-linksource -stylesheetfile -docencoding' -- "$cur" ) )
|
|
||||||
else
|
else
|
||||||
# source files completion
|
# source files completion
|
||||||
_filedir java
|
_filedir java
|
||||||
@ -304,11 +287,7 @@ _javac()
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
# relevant options completion
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" -help )' -- "$cur" ) )
|
||||||
COMPREPLY=( $( compgen -W '-g -g:none -g:lines -g:vars \
|
|
||||||
-g:source -O -nowarn -verbose -deprecation -classpath \
|
|
||||||
-sourcepath -bootclasspath -extdirs -d -encoding -source \
|
|
||||||
-target -help' -- "$cur" ) )
|
|
||||||
else
|
else
|
||||||
# source files completion
|
# source files completion
|
||||||
_filedir java
|
_filedir java
|
||||||
|
@ -17,8 +17,7 @@ _lftp()
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "$cur" == -* ]] ; then
|
if [[ "$cur" == -* ]] ; then
|
||||||
COMPREPLY=( $( compgen -W '-f -c --help --version -e -u -p' \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
-- "$cur" ) )
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -8,8 +8,7 @@ _lrzip()
|
|||||||
_init_completion || return
|
_init_completion || return
|
||||||
|
|
||||||
if [[ "$cur" == -* && $prev != -N ]]; then
|
if [[ "$cur" == -* && $prev != -N ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-w -d -o -O -S -f -D -q -L -n -l -b -g -M \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
-T -N -v -vv -V -h' -- "$cur" ) )
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -25,8 +25,7 @@ _mii_tool()
|
|||||||
$split && return 0
|
$split && return 0
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--verbose --version --reset --restart \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
--watch --log --advertise --force' -- "$cur" ) )
|
|
||||||
else
|
else
|
||||||
_available_interfaces -a
|
_available_interfaces -a
|
||||||
fi
|
fi
|
||||||
@ -54,10 +53,7 @@ _mii_diag()
|
|||||||
$split && return 0
|
$split && return 0
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--advertise --fixed-speed --all-interfaces \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
--status --debug --read-parameters --set-parameters --msg-level \
|
|
||||||
--phy --restart --reset --verbose --version --watch --help' \
|
|
||||||
-- "$cur" ) )
|
|
||||||
else
|
else
|
||||||
_available_interfaces -a
|
_available_interfaces -a
|
||||||
fi
|
fi
|
||||||
|
@ -25,16 +25,7 @@ _pkg_config()
|
|||||||
$split && return 0
|
$split && return 0
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
# return list of available options
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
COMPREPLY=( $( compgen -W '--version --modversion \
|
|
||||||
--atleast-pkgconfig-version --libs --static \
|
|
||||||
--short-errors --libs-only-l --libs-only-other \
|
|
||||||
--libs-only-L --cflags --cflags-only-I \
|
|
||||||
--cflags-only-other --variable --define-variable \
|
|
||||||
--exists --uninstalled --atleast-version \
|
|
||||||
--exact-version --max-version --list-all --debug \
|
|
||||||
--print-errors --silence-errors --errors-to-stdout \
|
|
||||||
--print-provides --print-requires --help --usage' -- "$cur") )
|
|
||||||
else
|
else
|
||||||
COMPREPLY=( $( compgen -W "$( pkg-config --list-all \
|
COMPREPLY=( $( compgen -W "$( pkg-config --list-all \
|
||||||
2>/dev/null | awk '{print $1}' )" -- "$cur" ) )
|
2>/dev/null | awk '{print $1}' )" -- "$cur" ) )
|
||||||
|
@ -14,7 +14,7 @@ _reptyr()
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ $cur == -* ]]; then
|
if [[ $cur == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-l -s' -- "$cur" ) )
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -27,8 +27,7 @@ _rtcwake()
|
|||||||
|
|
||||||
$split && return 0
|
$split && return 0
|
||||||
|
|
||||||
COMPREPLY=( $( compgen -W '--device --local --mode --seconds --time --utc \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
--verbose --version --help' -- "$cur" ) )
|
|
||||||
} &&
|
} &&
|
||||||
complete -F _rtcwake rtcwake
|
complete -F _rtcwake rtcwake
|
||||||
|
|
||||||
|
@ -40,11 +40,7 @@ _useradd()
|
|||||||
$split && return 0
|
$split && return 0
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--base-dir --comment --home-dir --defaults \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
--expiredate --inactive --gid --groups --help --skel --key \
|
|
||||||
--no-log-init --create-home --no-create-home --no-user-group \
|
|
||||||
--non-unique --password --system --shell --uid --user-group \
|
|
||||||
--selinux-user' -- "$cur" ) )
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
} &&
|
} &&
|
||||||
@ -87,10 +83,7 @@ _usermod()
|
|||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
# TODO: -U/--unlock, -p/--password, -L/--lock mutually exclusive
|
# TODO: -U/--unlock, -p/--password, -L/--lock mutually exclusive
|
||||||
COMPREPLY=( $( compgen -W '--append --comment --home --expiredate \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
--inactive --gid --groups --help --login --lock --move-home \
|
|
||||||
--non-unique --password --shell --uid --unlock --selinux-user' \
|
|
||||||
-- "$cur" ) )
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -105,7 +98,7 @@ _userdel()
|
|||||||
_init_completion || return
|
_init_completion || return
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--force --help --remove' -- "$cur" ) )
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -132,8 +125,7 @@ _chage()
|
|||||||
$split && return 0
|
$split && return 0
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--lastday --expiredate --help --inactive \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
--list --mindays --maxdays --warndays' -- "$cur" ) )
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -186,8 +178,7 @@ _chpasswd()
|
|||||||
$split && return 0
|
$split && return 0
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--crypt-method --encrypted \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
--help --md5 --sha-rounds' -- "$cur" ) )
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
} &&
|
} &&
|
||||||
@ -216,8 +207,7 @@ _newusers()
|
|||||||
$split && return 0
|
$split && return 0
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--crypt-method --help --system \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
--sha-rounds' -- "$cur" ) )
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -261,8 +251,7 @@ _groupadd()
|
|||||||
$split && return 0
|
$split && return 0
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--force --gid --help \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
--key --non-unique --password --system' -- "$cur" ) )
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
} &&
|
} &&
|
||||||
@ -289,8 +278,7 @@ _groupmod()
|
|||||||
$split && return 0
|
$split && return 0
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--gid --help --new-name \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
--non-unique --password' -- "$cur" ) )
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -321,14 +309,15 @@ _gpasswd()
|
|||||||
_init_completion || return
|
_init_completion || return
|
||||||
|
|
||||||
case $prev in
|
case $prev in
|
||||||
-a|-d|-A|-M)
|
-a|--add|-d|--delete|-A|--administrators|-M|--members)
|
||||||
COMPREPLY=( $( compgen -u -- "$cur" ) )
|
COMPREPLY=( $( compgen -u -- "$cur" ) )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-a -d -r -R -A -M' -- "$cur" ) )
|
# TODO: only -A and -M can be combined
|
||||||
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -343,18 +332,18 @@ _groupmems()
|
|||||||
_init_completion || return
|
_init_completion || return
|
||||||
|
|
||||||
case $prev in
|
case $prev in
|
||||||
-a|-d)
|
-a|--add|-d|--delete)
|
||||||
COMPREPLY=( $( compgen -u -- "$cur" ) )
|
COMPREPLY=( $( compgen -u -- "$cur" ) )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
-g)
|
-g|--group)
|
||||||
COMPREPLY=( $( compgen -g -- "$cur" ) )
|
COMPREPLY=( $( compgen -g -- "$cur" ) )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-a -d -p -g -l' -- "$cur" ) )
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
} &&
|
} &&
|
||||||
@ -388,8 +377,7 @@ _vipw()
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--group --help --passwd \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
--quiet --shadow' -- "$cur" ) )
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
} &&
|
} &&
|
||||||
@ -417,8 +405,7 @@ _faillog()
|
|||||||
$split && return 0
|
$split && return 0
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--all --help --lock-time \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
--maximum --reset --time --user' -- "$cur" ) )
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
} &&
|
} &&
|
||||||
@ -446,7 +433,7 @@ _lastlog()
|
|||||||
$split && return 0
|
$split && return 0
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--before --help --time --user' -- "$cur" ) )
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
} &&
|
} &&
|
||||||
|
@ -31,8 +31,7 @@ _wol()
|
|||||||
$split && return 0
|
$split && return 0
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--help --version --verbose --wait --host
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
--port --file --passwd' -- "$cur" ) )
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -18,9 +18,7 @@ _xrdb()
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-help -display -all -global -screen -screens
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
-n -quiet -cpp -nocpp -symbols -query -load -override -merge
|
|
||||||
-remove -retain -edit -backup' -- "$cur" ) )
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -10,12 +10,8 @@ _xz()
|
|||||||
_split_longopt && split=true
|
_split_longopt && split=true
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--compress --decompress --test --list \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" --long-help ) {-1..-9}' \
|
||||||
--keep --force --stdout --no-sparse --suffix --files --files0 \
|
-- "$cur" ) )
|
||||||
--format --check -0 -1 -2 -3 -4 -5 -6 -7 -8 -9 --extreme --memory \
|
|
||||||
--lzma1 --lzma2 --x86 --powerpc --ia64 --arm --armthumb --sparc \
|
|
||||||
--delta --quiet --verbose --no-warn --robot --info-memory --help \
|
|
||||||
--long-help --version' -- "$cur" ) )
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -67,8 +63,7 @@ _xzdec()
|
|||||||
_init_completion -n = || return
|
_init_completion -n = || return
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '--memory --quiet --help --version' \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||||
-- "$cur" ) )
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -17,22 +17,7 @@ assert_complete_any "display "
|
|||||||
sync_after_int
|
sync_after_int
|
||||||
|
|
||||||
|
|
||||||
set test "- should complete options"
|
assert_complete_any "display -"
|
||||||
set options {
|
|
||||||
-alpha -antialias -authenticate -auto-orient -backdrop -background -border
|
|
||||||
-bordercolor -borderwidth -channel -clip -clip-path -coalesce -colormap
|
|
||||||
-colors -colorspace -comment -compress -contrast -crop -debug -decipher
|
|
||||||
-define -delay -density -depth -despeckle -display -dispose -dither -edge
|
|
||||||
-endian -enhance -extract -filter -flatten -flip -flop -font -foreground
|
|
||||||
-format -frame -gamma -geometry -help -iconGeometry -iconic -identify
|
|
||||||
-immutable -interlace -interpolate -label -limit -list -log -loop -map
|
|
||||||
-mattecolor -monitor -monochrome -name -negate -page -profile -quality
|
|
||||||
-quantize -quiet -raise -regard-warnings -remote -repage -resample -resize
|
|
||||||
-respect-parenthesis -roll -rotate -sample -sampling-factor -scenes -seed
|
|
||||||
-segment -set -shared-memory -sharpen -size -strip -texture -title
|
|
||||||
-transparent-color -treedepth -trim -update -usePixmap -verbose -version
|
|
||||||
-virtual-pixel -visual -window -window-group -write }
|
|
||||||
assert_complete $options "display -" $test
|
|
||||||
|
|
||||||
|
|
||||||
sync_after_int
|
sync_after_int
|
||||||
|
Loading…
x
Reference in New Issue
Block a user