bash-completion: Don't offer any more completions after help or version.

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
This commit is contained in:
Ville Skyttä 2013-04-07 11:12:04 +03:00 committed by Karel Zak
parent 2885c533fd
commit d4f9b8d74c
87 changed files with 353 additions and 23 deletions

View File

@ -9,6 +9,9 @@ _blkdiscard_module()
COMPREPLY=( $(compgen -W "num" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -46,6 +46,9 @@ _blkid_module()
COMPREPLY=( $(compgen -W "$(awk '{print $NF}' /proc/filesystems)" -- $cur) )
return 0
;;
'-h'|'-V')
return 0
;;
esac
case $cur in
-*)

View File

@ -1,8 +1,14 @@
_cal_module()
{
local cur OPTS
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)
OPTS="-1 --one -3 --three -s --sunday -m --monday -j --julian -y --year -V --version -h --help"

View File

@ -17,6 +17,9 @@ _cfdisk_module()
COMPREPLY=( $(compgen -W "sectors" -- $cur) )
return 0
;;
'-v')
return 0
;;
esac
case $cur in
-*)

View File

@ -29,6 +29,9 @@ _chcpu_module()
COMPREPLY=( $(compgen -W "horizontal vertical" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
OPTS="-h --help
-e --enable

View File

@ -1,8 +1,14 @@
_chfn_module()
{
local cur OPTS
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-u'|'--help'|'-v'|'--version')
return 0
;;
esac
case $cur in
-*)
OPTS="-f --full-name -o --office -p --office-phone -h --home-phone -u --help -v --version"

View File

@ -1,8 +1,14 @@
_chrt_module()
{
local cur OPTS
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
# FIXME: -p is ambiguous, it takes either pid or priority as an
# argument depending on whether user wanted to get or set the
# values. Perhaps the command interface should be reconsidered.

View File

@ -9,6 +9,9 @@ _chsh_module()
COMPREPLY=( $(compgen -W "$(chsh -l)" -- $cur) )
return 0
;;
'-u'|'--help'|'-v'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -9,6 +9,9 @@ _col_module()
COMPREPLY=( $(compgen -W "number" -- $cur) )
return 0
;;
'-H'|'--help'|'-V'|'--version')
return 0
;;
esac
OPTS="-b --no-backspaces
-f --fine

View File

@ -1,8 +1,14 @@
_colcrt_module()
{
local cur OPTS
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)
OPTS=" - --no-underlining

View File

@ -1,8 +1,14 @@
_colrm_module()
{
local cur OPTS
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)
OPTS="-V --version -h --help"

View File

@ -13,6 +13,9 @@ _column_module()
COMPREPLY=( $(compgen -W "string" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -1,8 +1,14 @@
_ctrlaltdel_module()
{
local cur
cur="${COMP_WORDS[COMP_CWORD]}"
local cur prev
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
if [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $(compgen -W "hard soft" -- $cur) )
fi

View File

@ -13,6 +13,9 @@ _cytune_module()
COMPREPLY=( $(compgen -W "seconds" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -4,6 +4,11 @@ _delpart_module()
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $COMP_CWORD in
1)
local DEV TYPE DEVICES=''

View File

@ -22,6 +22,9 @@ _dmesg_module()
COMPREPLY=( $(compgen -W "size" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
OPTS="-C --clear
-c --read-clear

View File

@ -18,6 +18,9 @@ _eject_module()
COMPREPLY=( $(compgen -W "$(eject -X)" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -9,6 +9,9 @@ _fallocate_module()
COMPREPLY=( $(compgen -W "bytes" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -1,8 +1,14 @@
_fdformat_module()
{
local cur OPTS
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
DEVS=$(for I in echo /dev/fd*; do if [ -e $I ]; then echo $I; fi; done)
OPTS="-n --no-verify -h --help -V --version $DEVS"
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )

View File

@ -29,6 +29,9 @@ _fdisk_module()
COMPREPLY=( $(compgen -W "number" -- $cur) )
return 0
;;
'-h'|'-v')
return 0
;;
esac
case $cur in
-*)

View File

@ -77,6 +77,9 @@ _findmnt_module()
COMPREPLY=( $(compgen -W "$DEV_MPOINT" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -18,6 +18,9 @@ _flock_module()
COMPREPLY=( $(compgen -c -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -21,6 +21,9 @@ _fsck_module()
COMPREPLY=( $(compgen -W "bad_blocks_file" -- $cur) )
return 0
;;
'-?')
return 0
;;
esac
case $cur in
-*)

View File

@ -11,6 +11,9 @@ _fsck.cramfs_module()
COMPREPLY=( $(compgen -o dirnames -- ${cur:-"/"}) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
COMPREPLY=( $(compgen -W "${OPTS[*]}" -S ' ' -- $cur) )
return 0

View File

@ -1,8 +1,14 @@
_fsck.minix_module()
{
local cur OPTS DEVS
local cur prev OPTS DEVS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-V'|'--version')
return 0
;;
esac
while read dev; do DEVS+="$dev " ; done < <(lsblk -pnro name)
OPTS="-l -a -r -v -s -m -f -V --version"
COMPREPLY=( $(compgen -W "${OPTS[*]} $DEVS" -- $cur) )

View File

@ -1,8 +1,14 @@
_fsfreeze_module()
{
local cur OPTS
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)
OPTS="-f --freeze -u --unfreeze -h --help -V --version"

View File

@ -9,6 +9,9 @@ _fstrim_module()
COMPREPLY=( $(compgen -W "num" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -21,6 +21,9 @@ _getopt_module()
COMPREPLY=( $(compgen -W "sh bash csh tcsh" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -17,6 +17,9 @@ _hexdump_module()
COMPREPLY=( $(compgen -W "offset" -- $cur) )
return 0
;;
'-V')
return 0
;;
esac
case $cur in
-*)

View File

@ -18,6 +18,9 @@ _hwclock_module()
COMPREPLY=( $(compgen -W "year" -- $cur) )
return 0
;;
'-h'|'-?'|'--help'|'-v'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -19,6 +19,9 @@ _ionice_module()
COMPREPLY=( $(compgen -W "$PIDS" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -35,6 +35,9 @@ _ipcrm_module()
COMPREPLY=( $(compgen -W "$KEYIDS" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
'=')

View File

@ -9,6 +9,9 @@ _ipcs_module()
COMPREPLY=( $(compgen -W "id" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
OPTS="-i --id
-h --help

View File

@ -10,6 +10,9 @@ _isosize_module()
COMPREPLY=( $(compgen -W "number" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
return 0

View File

@ -20,6 +20,9 @@ _ldattach_module()
COMPREPLY=( $(compgen -W "$IFLAGS" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -30,6 +30,9 @@ _logger_module()
COMPREPLY=( $(compgen -W "$(awk '$NF ~ /^\// {print $NF}' /proc/net/unix)" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -9,6 +9,9 @@ _look_module()
COMPREPLY=( $(compgen -W "char" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -34,6 +34,9 @@ _losetup_module()
COMPREPLY=( $(compgen -W "$OUTPUT" -S ',' -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -30,6 +30,9 @@ _lsblk_module()
COMPREPLY=( $(compgen -W "$OUTPUT" -S ',' -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -22,6 +22,9 @@ _lscpu_module()
COMPREPLY=( $(compgen -W "$OPTS" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -21,7 +21,9 @@ _lslocks_module()
COMPREPLY=( $(compgen -W "$OUTPUT" -S ',' -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -10,6 +10,9 @@ _mcookie_module()
COMPREPLY=( $(compgen -f -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -1,8 +1,14 @@
_mesg_module()
{
local cur OPTS
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)
OPTS="-v --verbose -V --version -h --help"

View File

@ -10,6 +10,9 @@ _mkfs_module()
COMPREPLY=( $(compgen -W "$FSTYPES" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -13,6 +13,9 @@ _bfs_module()
COMPREPLY=( $(compgen -W "name" -- $cur) )
return 0
;;
'-h'|'--help'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -25,6 +25,9 @@ _mkfs.cramfs_module()
COMPREPLY=( $(compgen -W "name" -- $cur) )
return 0
;;
'-h'|'-V')
return 0
;;
esac
case $cur in
-*)

View File

@ -17,6 +17,9 @@ _mkfs.minix_module()
COMPREPLY=( $(compgen -W "14 30" -- $cur) )
return 0
;;
'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -17,7 +17,7 @@ _mkswap_module()
COMPREPLY=( $(compgen -W "1" -- $cur) )
return 0
;;
'-U'|--uuid)
'-U'|'--uuid'|'-h'|'--help'|'-V'|'--version')
return 0
;;
esac

View File

@ -1,8 +1,14 @@
_more_module()
{
local cur OPTS
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-V')
return 0
;;
esac
case $cur in
-*)
OPTS="-d -f -l -p -c -u -s -number -V"

View File

@ -9,6 +9,9 @@ _mountpoint_module()
COMPREPLY=( $(compgen -W "fixme" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -3,6 +3,12 @@ _namei_module()
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)
OPTS="-h --help -V --version -x --mountpoints -m --modes -o --owners -l --long -n --nosymlinks -v --vertical"

View File

@ -3,6 +3,12 @@ _newgrp_module()
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)
OPTS="-V --version -h --help"

View File

@ -11,6 +11,9 @@ _nsenter_module()
COMPREPLY=( $(compgen -W "$PIDS" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
'=')

View File

@ -20,6 +20,9 @@ _partx_module()
COMPREPLY=( $(compgen -W "aix bsd dos gpt mac minix sgi solaris_x86 sun ultrix unixware" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -9,6 +9,9 @@ _pg_module()
COMPREPLY=( $(compgen -W "prompt" -- $cur) )
return 0
;;
'-h'|'-V')
return 0
;;
esac
case $cur in
-*)

View File

@ -1,8 +1,14 @@
_pivot_root_module()
{
local cur
local cur prev
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $COMP_CWORD in
1|2)
compopt -o filenames

View File

@ -18,6 +18,9 @@ _prlimit_module()
COMPREPLY=( $(compgen -W "$OUTPUT" -S ',' -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
'=')

View File

@ -1,8 +1,14 @@
_raw_module()
{
local cur
local cur prev
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)
local OPTS

View File

@ -14,6 +14,9 @@ _readprofile_module()
COMPREPLY=( $(compgen -W "multiplier" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
OPTS="-m --mapfile
-p --profile

View File

@ -3,6 +3,12 @@ _rename_module()
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)
OPTS="-v --verbose -s --symlink -h --help -V --version"

View File

@ -25,6 +25,9 @@ _renice_module()
COMPREPLY=( $(compgen -u -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
OPTS="-g --pgrp
-n --priority

View File

@ -3,6 +3,12 @@ _resizepart_module()
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $COMP_CWORD in
1)
local DEV TYPE DEVICES=''

View File

@ -1,8 +1,14 @@
_rev_module()
{
local cur OPTS
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)
OPTS="-V --version -h --help"

View File

@ -23,6 +23,9 @@ _rtcwake_module()
COMPREPLY=( $(compgen -W "time_t" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
OPTS="-d --device
-n --dry-run

View File

@ -10,6 +10,9 @@ _script_module()
COMPREPLY=( $(compgen -c -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
'=')

View File

@ -9,6 +9,9 @@ _scriptreplay_module()
COMPREPLY=( $(compgen -W "digit" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -1,8 +1,14 @@
_setarch_module()
{
local cur OPTS
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
if [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $(compgen -W "linux32 linux64 ppc32 ppc ppc64
ppc64pseries ppc64iseries i386

View File

@ -50,6 +50,9 @@ _setpriv_module()
COMPREPLY=( $(compgen -W "profile" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -1,8 +1,14 @@
_setsid_module()
{
local cur OPTS
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)
OPTS="-c --ctty -h --help -V --version"

View File

@ -69,6 +69,9 @@ _setterm_module()
COMPREPLY=( $(compgen -W "freqnumber" -- $cur) )
return 0
;;
'-help'|'-version')
return 0
;;
esac
OPTS=" -term
-reset

View File

@ -18,6 +18,9 @@ _sfdisk_module()
COMPREPLY=( $(compgen -f -- $cur) )
return 0
;;
'-h'|'--help'|'-v'|'--version')
return 0
;;
esac
case $cur in
'=')

View File

@ -17,6 +17,9 @@ _su_module()
COMPREPLY=( $(compgen -W "$(chsh -l)" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -13,6 +13,9 @@ _swaplabel_module()
COMPREPLY=( $(compgen -W '$(uuidgen)' -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -19,6 +19,9 @@ _swapon_module()
COMPREPLY=( $(compgen -W "$OUTPUT" -S ',' -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -9,6 +9,9 @@ _tailf_module()
COMPREPLY=( $(compgen -W "number" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -23,6 +23,9 @@ _taskset_module()
COMPREPLY=( $(compgen -W "$PIDS" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -21,6 +21,9 @@ _tunelp_module()
COMPREPLY=( $(compgen -W "off on" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -14,6 +14,9 @@ _ul_module()
COMPREPLY=( $(compgen -W "$TERM_LIST" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -1,8 +1,14 @@
_unshare_module()
{
local cur OPTS
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)
OPTS="-m --mount

View File

@ -3,6 +3,12 @@ _utmpdump_module()
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)
OPTS="-f --follow -r --reverse -V --version -h --help"

View File

@ -20,6 +20,9 @@ _uuidd_module()
COMPREPLY=( $(compgen -W "number" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -1,8 +1,14 @@
_uuidgen_module()
{
local cur OPTS
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)
OPTS="-r --random -t --time -V --version -h --help"

View File

@ -9,6 +9,9 @@ _wall_module()
COMPREPLY=( $(compgen -W "seconds" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -34,6 +34,9 @@ _wdctl_module()
COMPREPLY=( $(compgen -W "seconds" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -10,6 +10,9 @@ _whereis_module()
COMPREPLY=( $(compgen -o dirnames -- ${cur:-"/"}) )
return 0
;;
'-h'|'-V')
return 0
;;
esac
case $cur in
-*)

View File

@ -15,7 +15,9 @@ _wipefs_module()
COMPREPLY=( $(compgen -W "$TYPES" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)

View File

@ -1,8 +1,14 @@
_write_module()
{
local cur
local cur prev
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $COMP_CWORD in
1)
COMPREPLY=( $(compgen -u -- $cur) )