]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
bash-completion: Don't offer any more completions after help or version.
authorVille Skyttä <ville.skytta@iki.fi>
Sun, 7 Apr 2013 08:12:04 +0000 (11:12 +0300)
committerKarel Zak <kzak@redhat.com>
Mon, 8 Apr 2013 15:06:52 +0000 (17:06 +0200)
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
87 files changed:
bash-completion/blkdiscard
bash-completion/blkid
bash-completion/cal
bash-completion/cfdisk
bash-completion/chcpu
bash-completion/chfn
bash-completion/chrt
bash-completion/chsh
bash-completion/col
bash-completion/colcrt
bash-completion/colrm
bash-completion/column
bash-completion/ctrlaltdel
bash-completion/cytune
bash-completion/delpart
bash-completion/dmesg
bash-completion/eject
bash-completion/fallocate
bash-completion/fdformat
bash-completion/fdisk
bash-completion/findmnt
bash-completion/flock
bash-completion/fsck
bash-completion/fsck.cramfs
bash-completion/fsck.minix
bash-completion/fsfreeze
bash-completion/fstrim
bash-completion/getopt
bash-completion/hexdump
bash-completion/hwclock
bash-completion/ionice
bash-completion/ipcrm
bash-completion/ipcs
bash-completion/isosize
bash-completion/ldattach
bash-completion/logger
bash-completion/look
bash-completion/losetup
bash-completion/lsblk
bash-completion/lscpu
bash-completion/lslocks
bash-completion/mcookie
bash-completion/mesg
bash-completion/mkfs
bash-completion/mkfs.bfs
bash-completion/mkfs.cramfs
bash-completion/mkfs.minix
bash-completion/mkswap
bash-completion/more
bash-completion/mountpoint
bash-completion/namei
bash-completion/newgrp
bash-completion/nsenter
bash-completion/partx
bash-completion/pg
bash-completion/pivot_root
bash-completion/prlimit
bash-completion/raw
bash-completion/readprofile
bash-completion/rename
bash-completion/renice
bash-completion/resizepart
bash-completion/rev
bash-completion/rtcwake
bash-completion/script
bash-completion/scriptreplay
bash-completion/setarch
bash-completion/setpriv
bash-completion/setsid
bash-completion/setterm
bash-completion/sfdisk
bash-completion/su
bash-completion/swaplabel
bash-completion/swapon
bash-completion/tailf
bash-completion/taskset
bash-completion/tunelp
bash-completion/ul
bash-completion/unshare
bash-completion/utmpdump
bash-completion/uuidd
bash-completion/uuidgen
bash-completion/wall
bash-completion/wdctl
bash-completion/whereis
bash-completion/wipefs
bash-completion/write

index 757480c08a72f0abe1a3b6ba667f27f0300af1e6..d19ab05a5695baa506ca7931f48178689b16cc29 100644 (file)
@@ -9,6 +9,9 @@ _blkdiscard_module()
                        COMPREPLY=( $(compgen -W "num" -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index 14222a44f0c80538280a7e466d45601e7dcbac1b..b4393285878d1ab68e11076db942151ca703730f 100644 (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
                -*)
index d50c8bbca535ec9c435cc3b1b1e1e8ade7a947ad..6c7c1743dad585de26d2c6e83564677f0bae2f17 100644 (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"
index 4be5186c44ba6a0acd6a9c847977a7fd0331d3f7..6cd9d6f7e590bbb8c92394b1e8e373c206365c80 100644 (file)
@@ -17,6 +17,9 @@ _cfdisk_module()
                        COMPREPLY=( $(compgen -W "sectors" -- $cur) )
                        return 0
                        ;;
+               '-v')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index 19386e24c2c3d7ad721cb180d4a4c3d69fe9aee2..d05b650e6af356dc1b737d91b3e6d8ae55ae7f31 100644 (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
index a8eaee5ae8f2b1b0a1f7a5386492cd9a125eaa28..01139e8ba1394d13b3b6787b66274f9cd1839ced 100644 (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"
index b85775a4fb79548bbc5caacec052a54611fcf860..b2e521630c8d7bd0aadfc8cdf1a75e873a0f077c 100644 (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.
index c0a194cf3d7616a7188ffb0f4b774f8d1f392c99..5b191e9699b133adb85071af6f78275cc84a1101 100644 (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
                -*)
index 9ad3a67320ce392793df990a146a51dbde702b0d..41cac724055a6f456bc069234c37929443c6912d 100644 (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
index 628416e6d1c78378412038278c43e2f979053a0d..28093a89a1505eda7fde8648c2174077220c739f 100644 (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
index aa57c02ab954547b5cfd436b68b258b8acaecd7b..54706b36fdce3b222537c5dc4c45c577a73b2de8 100644 (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"
index 94e1a51176021cd2327eb63ae738127c9999c306..23d923f07ee38a9252d456310add57cb5140ec89 100644 (file)
@@ -13,6 +13,9 @@ _column_module()
                        COMPREPLY=( $(compgen -W "string" -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index e72575223cfc9d9d06b4c8302af87fc446529191..bc8a9432d078bea77032c9eb4e30de4fcb0708b0 100644 (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
index 9a90d34e24c16a8691450e8edf7d103a7c2cfe71..7ded86c0408e2dca9e14d92511bfcccdbb92e729 100644 (file)
@@ -13,6 +13,9 @@ _cytune_module()
                        COMPREPLY=( $(compgen -W "seconds" -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index e3ee406291a02c7afc59ccd82253acd57ad2f949..70543f0a033087dfd2100aa1a06434cbd52c85c9 100644 (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=''
index 18ee59fc6e3021aacff3a499c198f1488ed6372d..f1189d2c68cd02d9ec53624281000438554927ab 100644 (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
index b767e81984b3e23e519822a6b8d9b0f57325153e..8c2d62f997dd02b985e06b76bf22edc281937a65 100644 (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
                -*)
index 132858cafb26c1dedee04135776308561a213d5d..f3431b73082f5e1c8847ef089351b71199933018 100644 (file)
@@ -9,6 +9,9 @@ _fallocate_module()
                        COMPREPLY=( $(compgen -W "bytes" -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index 4ad1c3d05eec5baf836c596f25ca7ef1a31766bd..376000a16d6e1e596ab686b5dac426862c9a3b1b 100644 (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) )
index ae94f10c6738db87e2798176b74b1f4d294d7151..b800f8df2f547e6792b0856c1a35082d8c58d72e 100644 (file)
@@ -29,6 +29,9 @@ _fdisk_module()
                        COMPREPLY=( $(compgen -W "number" -- $cur) )
                        return 0
                        ;;
+               '-h'|'-v')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index c2dfa21b266eaec3c6ddf877755868474b75462a..cdc4861c22c38e58ccecbe32ba8c94adcf2d433f 100644 (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
                -*)
index cfa9b660b84d72eea21a3f20c11a2dbc78b87c72..3f094e37d7634c66ae80d6da2e7ade323d0bb5ea 100644 (file)
@@ -18,6 +18,9 @@ _flock_module()
                        COMPREPLY=( $(compgen -c -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index 40b9a13e71d96fc65e789e1cce2e25b6555c1de1..04899a0d197c3c5d45f8ee07b4ea30f0ace3c5fd 100644 (file)
@@ -21,6 +21,9 @@ _fsck_module()
                        COMPREPLY=( $(compgen -W "bad_blocks_file" -- $cur) )
                        return 0
                        ;;
+               '-?')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index 410b084ce6cee6e8a806bf4196b50ab4ab11d819..bfc18edf2e0ede04c6574368c03dca9c060b2c96 100644 (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
index 6239ae4a27a9213f9085c24f6c01a3f2e51510e5..e702199555480c166312b0c94d00a218da6a21b4 100644 (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) )
index 7933c15746052bd93b85170cc697f5a38eb64486..ec29b1e4d4add5a83fd80ebeb5e2b86815666cab 100644 (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"
index 6587d57213243008f4366b27fc2f5ebf9e0387f8..5427e7285d8e9279b2ca27f4d08fe8f4e8a822a5 100644 (file)
@@ -9,6 +9,9 @@ _fstrim_module()
                        COMPREPLY=( $(compgen -W "num" -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index ea8c8e2b63d37fcf69001a52106ca4ce0fecd8db..d18d2a166ecfeb27e6e21d41db59ead405a40eb1 100644 (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
                -*)
index 1a6786bb6391caa8de00c0598b1c0d7789e8338f..0c91187f1d67113a64f6fc29b4f256cd8bd21469 100644 (file)
@@ -17,6 +17,9 @@ _hexdump_module()
                        COMPREPLY=( $(compgen -W "offset" -- $cur) )
                        return 0
                        ;;
+               '-V')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index 855e8857561b047e370cc6e8644a526189e429b8..b09e63df014c7d1ee94153de93575164152b2519 100644 (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
                -*)
index 2180718105c7e94ff209fe6aa44b41058c57925b..e7a8ac868142bdb36ae4b55325945db9455b2806 100644 (file)
@@ -19,6 +19,9 @@ _ionice_module()
                        COMPREPLY=( $(compgen -W "$PIDS" -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index fd85091c3cc934c40edd4a6e9fee98a7acbd5fee..6e2aff067dee920a06f2afe0bbda2d27dc30d134 100644 (file)
@@ -35,6 +35,9 @@ _ipcrm_module()
                        COMPREPLY=( $(compgen -W "$KEYIDS" -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                '=')
index 51502bb0a2c4b37f97887cff597d257fdc6b627a..2cb7e613ceecf4f912b2d27bd11d97a5eb608361 100644 (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
index 2b4a49918345388abc8199d6566eff52e297fb22..487e40d979d46d2fd075fa4961a929213018a0bb 100644 (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
index dc83dfcd3a7ed3d42cbad53029e17aedbaf873f7..a53329c6318918fa7b0112bb17c4d97860f56b48 100644 (file)
@@ -20,6 +20,9 @@ _ldattach_module()
                        COMPREPLY=( $(compgen -W "$IFLAGS" -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index f572302cc5a998fd1d93c3f71005c328e61dd4ce..1f89e2dca4bc827179c359511fa9da40a6ea1e54 100644 (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
                -*)
index 68cea563b0e0c06de76147e73caeaca9e7c4f346..daa5ecb713c1a58f3bf731d63b6013d211d218cf 100644 (file)
@@ -9,6 +9,9 @@ _look_module()
                        COMPREPLY=( $(compgen -W "char" -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index 329bb055ed12522eea5ecdae5ca1a75f331cdc56..4afcd3ff0215b7e355905abe7c54c788c223799e 100644 (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
                -*)
index 54981992c81c6a2b284a6c4cd7c0359b0c7034cb..e1e4dd7816f891bee37b5d9b03b540be6dcd2f8d 100644 (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
                -*)
index 14926ec90c7761dc9557cb06f39c7fcd73fb3014..5df0f9f74790ff54eb3a0058ecd5745d319f8450 100644 (file)
@@ -22,6 +22,9 @@ _lscpu_module()
                        COMPREPLY=( $(compgen -W "$OPTS" -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index f55c17ecb33549e891e7557a99747c82312baace..cde81b137c1ccad21779710c74a56526f34cb56d 100644 (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
                -*)
index 1c01a55220eaa26aa6eac4fea30227c2f0206b22..ce5ee9cda2375c1105227bf4a8310a0caa4fbe3b 100644 (file)
@@ -10,6 +10,9 @@ _mcookie_module()
                        COMPREPLY=( $(compgen -f -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index 62c98ca29bb1036fe386cacc849aee19c46b82b5..8513c02992d0f3141dd45f60a43e89af315c501a 100644 (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"
index 19471195ec3c03d34886d7677c2eec5056882d3e..48684fea40da47b14ee2ed2c3fe934dcb247c32b 100644 (file)
@@ -10,6 +10,9 @@ _mkfs_module()
                        COMPREPLY=( $(compgen -W "$FSTYPES" -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index 7a47a76fb3f26445015fd1a44c1250409a2ffe00..44f15f3432423d00b5d0c70260ab6d815d660add 100644 (file)
@@ -13,6 +13,9 @@ _bfs_module()
                        COMPREPLY=( $(compgen -W "name" -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index 65ee988365654c00bd616942439192099b46cd94..38ab3b65f84979fa65047c8d13a862accc624166 100644 (file)
@@ -25,6 +25,9 @@ _mkfs.cramfs_module()
                        COMPREPLY=( $(compgen -W "name" -- $cur) )
                        return 0
                        ;;
+               '-h'|'-V')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index 085a0587b85883a65048f5afba4030426cb7e537..78c986f9de4c7ac563b770433ef11bca5d3bda68 100644 (file)
@@ -17,6 +17,9 @@ _mkfs.minix_module()
                        COMPREPLY=( $(compgen -W "14 30" -- $cur) )
                        return 0
                        ;;
+               '-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index 30d517cad3966ed1c25afd840997df88d4d25ae9..32bc533cf21432d5bac1c15477bc231a489d4e47 100644 (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
index f32770d52b508f863207424255cdaf34cd20c107..945c7b341239674252a11ab38ef8d2a4180984a6 100644 (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"
index e2f1d568647c4911b86fbe45dbb8acfc5719684c..308c4d696dd8f7ea3d32d02d533444719ec2d7ad 100644 (file)
@@ -9,6 +9,9 @@ _mountpoint_module()
                        COMPREPLY=( $(compgen -W "fixme" -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index c44821c5ac9d45ee195204e65dfe22f5ec9a95cc..561f45fdf4ffeb41c3b005b9ac9f59a3644aacba 100644 (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"
index 567c08cfcbd5a8222e90c874f58a1dc35b279d03..3e080dfd32e37240b49729e59a070d23305564b3 100644 (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"
index b8296b6dfa2ca4d425482b9f354ffd00918a0575..7950eab981dd3242a1d338cf3dc3d35882b0988a 100644 (file)
@@ -11,6 +11,9 @@ _nsenter_module()
                        COMPREPLY=( $(compgen -W "$PIDS" -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                '=')
index db2eded6abb3913fa567e0f3c7495329f6e43100..b643dd8d31ee8e244d99530ad994e0a41ae93ebc 100644 (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
                -*)
index 4ae888745f66f63b7a3ce9d8a223b137886b8158..9b1bad93097aa3538d93d113653adc9f5d64d2b4 100644 (file)
@@ -9,6 +9,9 @@ _pg_module()
                        COMPREPLY=( $(compgen -W "prompt" -- $cur) )
                        return 0
                        ;;
+               '-h'|'-V')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index 54f173425b564642a4a0f8d0dcce14109243238c..961c8837482d0a2b7c4e43e021c66d2a8f875d74 100644 (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
index bf5ff2f3b1892b993343e7611a08de3b3dc9a2c0..3c1a1ac629aa7b651a371ae44e6fe433f72b1a0a 100644 (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
                '=')
index 27f0354544b4ed826c08f3b30c78e83588454888..231f2cc4f15a238b020e51497d1872b55d95561e 100644 (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
index c1eb514b48c6f914b8f05854db80470bfa266c99..41454a3730cb4ec8d48d28205ea96c9b4266c9e3 100644 (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
index 0fe4cc64b1999c0fc2ab6eef507624e23c1935ca..b42d2d186417bacb3d0d868ebcef387e82d803be 100644 (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"
index aba00d7874638c366c07777ac78e8ead7b1ea1f0..deb979327fe1857cb43f62f21bbd388104801711 100644 (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
index b178b529cb46e7f04258f7d35a618e69b794d732..e55005aa68e81be925ea480e5a4eaef96f1408ec 100644 (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=''
index f891f1910d591ceeb9560f4ff032f13f8678935e..2ba5781695f3ef6ae078ce50795cbfbd60b43521 100644 (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"
index 1f38df827f9dee4df15b4f49fe46a9f588260df3..e54d105c11fadac73d68e9fd8a116ba6b86f2805 100644 (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
index 48f50c3eece3c3edf601e18560aa0b10ddbd17a5..c02f1be9d7d4949c2006c8438fb8faa64d1fdbf1 100644 (file)
@@ -10,6 +10,9 @@ _script_module()
                        COMPREPLY=( $(compgen -c -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                '=')
index 78e5b23a746595de2ac9acaf96796b73ce748e6e..09b0d01c531910a4b9968a7476f4864179e21a82 100644 (file)
@@ -9,6 +9,9 @@ _scriptreplay_module()
                        COMPREPLY=( $(compgen -W "digit" -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index b84d399b524e140ca2a9089f3c281292af1458ee..6224a11caed23815cc64dda46e369527a8c6b589 100644 (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
index b05affe7264e8755adf6412ca8d47a9bce999a35..00f87af2b3057f068203cc0d84c2c1a38c5464c2 100644 (file)
@@ -50,6 +50,9 @@ _setpriv_module()
                        COMPREPLY=( $(compgen -W "profile" -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index dcefc2f0559604024554444432b9ad5983f021c9..a14ae42e736c1f2e3418e1ff25a7dfeed4352d45 100644 (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"
index 33d2e56f60dd51ecbc79a43b45f4aab200989cc7..ae07d1ee6e3532444a76c0c50b8774666002454a 100644 (file)
@@ -69,6 +69,9 @@ _setterm_module()
                        COMPREPLY=( $(compgen -W "freqnumber" -- $cur) )
                        return 0
                        ;;
+               '-help'|'-version')
+                       return 0
+                       ;;
        esac
        OPTS="  -term
                -reset
index 5498b0e90927926c567db55bfa117fa8b07ffce0..102fd85ad25bde9afe2591db3a14683337b4e866 100644 (file)
@@ -18,6 +18,9 @@ _sfdisk_module()
                        COMPREPLY=( $(compgen -f -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-v'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                '=')
index c72f6a10b72897e61f78dd6d8be749cbb2ea5af8..dbd3d2f68072de761ba809f7436aaf4e32b4a624 100644 (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
                -*)
index c857d1592a2b57dabd9b0c7bcf5dc96ca662c8a9..5909941919e69a4b4ea34937f4054b52d649bb5e 100644 (file)
@@ -13,6 +13,9 @@ _swaplabel_module()
                        COMPREPLY=( $(compgen -W '$(uuidgen)' -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index 83e7e241fadae0caca66a792a3440c53665346c0..0e7c2008ba5a9310f81fa8bc682dad224239dac8 100644 (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
                -*)
index 29c5bed0ab54528628d53c14646147edaf1c0b60..32214d94d914c4487dd5519c84c49b35baeb2357 100644 (file)
@@ -9,6 +9,9 @@ _tailf_module()
                        COMPREPLY=( $(compgen -W "number" -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index 5311316a241c9042e84410491be3e765ebd9f5e9..c7d819b55f9c2c95798b28e8ba344bedfa473942 100644 (file)
@@ -23,6 +23,9 @@ _taskset_module()
                        COMPREPLY=( $(compgen -W "$PIDS" -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index 0f048429fdf909c89c14b2458e3aa15ce1418144..e45cbec937dbb7250c47a23c5c6e190b1f6fcc25 100644 (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
                -*)
index 07d073135793fb8a7edf6b81786b7be830eb1a78..be3529df59a0e4a695db1ab919eefeae42742360 100644 (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
                -*)
index 295d02f90ce123c6984ca2fe3113674cfcf49d9e..5342961f6028c238414aa23303b2e3949bcea28d 100644 (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
index e306ef836a349f135ed58f54b2cbe4cb8da9cf9d..bf186380b56cbb595f31c6b9a26d384ba870d26d 100644 (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"
index 23c1a4906980e520df051a3a05df170962c5ef28..c69a7c1b7bff6898c6685e737267e613edb23c6b 100644 (file)
@@ -20,6 +20,9 @@ _uuidd_module()
                        COMPREPLY=( $(compgen -W "number" -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index d9edde9b03e2cafc12f4ddfd76eba7cfac5ec99b..2cf30a20737ea709aeb9f0fb71ea5bf7a61f8c8d 100644 (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"
index d3cbbd56a9dfead8f551f3d4a6be7c6df870e1f8..4086ffe5b7fd519828472e2e70588d822f7a1cae 100644 (file)
@@ -9,6 +9,9 @@ _wall_module()
                        COMPREPLY=( $(compgen -W "seconds" -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index 42889acad856c31e7eda540ea8e9b6b0c84bc121..01d19a05a6ddf33c70c97bcaadfa4a83c2782d2a 100644 (file)
@@ -34,6 +34,9 @@ _wdctl_module()
                        COMPREPLY=( $(compgen -W "seconds" -- $cur) )
                        return 0
                        ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index 96e4117a9518dc2c4f5e882a65bf3a1df6555121..2273a07c5df77e00dead20598fb4bacbdfbf71df 100644 (file)
@@ -10,6 +10,9 @@ _whereis_module()
                        COMPREPLY=( $(compgen -o dirnames -- ${cur:-"/"}) )
                        return 0
                        ;;
+               '-h'|'-V')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index db9426e2ad23571a977d5884b6fcd4522cf887a3..20dd40d2111c13dbc756caed4fdf9034566301d9 100644 (file)
@@ -15,7 +15,9 @@ _wipefs_module()
                        COMPREPLY=( $(compgen -W "$TYPES" -- $cur) )
                        return 0
                        ;;
-
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
        esac
        case $cur in
                -*)
index d41159b2d868b26fbb8953ae2f2a05778cc968a4..1fe0807214e48ebbdd7f44bc371856e1cfb5564d 100644 (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) )