summaryrefslogtreecommitdiff
path: root/bash-completion
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2013-04-07 11:12:04 +0300
committerKarel Zak <kzak@redhat.com>2013-04-08 17:06:52 +0200
commitd4f9b8d74c5110c6ee92483facd7a0d94a1a9e57 (patch)
tree4457e6b5111b2fbea8c1591b44fecc56037f49cc /bash-completion
parent2885c533fd11cb91ddd5dae17ed93b4de363496b (diff)
downloadutil-linux-d4f9b8d74c5110c6ee92483facd7a0d94a1a9e57.tar.gz
bash-completion: Don't offer any more completions after help or version.
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
Diffstat (limited to 'bash-completion')
-rw-r--r--bash-completion/blkdiscard3
-rw-r--r--bash-completion/blkid3
-rw-r--r--bash-completion/cal8
-rw-r--r--bash-completion/cfdisk3
-rw-r--r--bash-completion/chcpu3
-rw-r--r--bash-completion/chfn8
-rw-r--r--bash-completion/chrt8
-rw-r--r--bash-completion/chsh3
-rw-r--r--bash-completion/col3
-rw-r--r--bash-completion/colcrt8
-rw-r--r--bash-completion/colrm8
-rw-r--r--bash-completion/column3
-rw-r--r--bash-completion/ctrlaltdel10
-rw-r--r--bash-completion/cytune3
-rw-r--r--bash-completion/delpart5
-rw-r--r--bash-completion/dmesg3
-rw-r--r--bash-completion/eject3
-rw-r--r--bash-completion/fallocate3
-rw-r--r--bash-completion/fdformat8
-rw-r--r--bash-completion/fdisk3
-rw-r--r--bash-completion/findmnt3
-rw-r--r--bash-completion/flock3
-rw-r--r--bash-completion/fsck3
-rw-r--r--bash-completion/fsck.cramfs3
-rw-r--r--bash-completion/fsck.minix8
-rw-r--r--bash-completion/fsfreeze8
-rw-r--r--bash-completion/fstrim3
-rw-r--r--bash-completion/getopt3
-rw-r--r--bash-completion/hexdump3
-rw-r--r--bash-completion/hwclock3
-rw-r--r--bash-completion/ionice3
-rw-r--r--bash-completion/ipcrm3
-rw-r--r--bash-completion/ipcs3
-rw-r--r--bash-completion/isosize3
-rw-r--r--bash-completion/ldattach3
-rw-r--r--bash-completion/logger3
-rw-r--r--bash-completion/look3
-rw-r--r--bash-completion/losetup3
-rw-r--r--bash-completion/lsblk3
-rw-r--r--bash-completion/lscpu3
-rw-r--r--bash-completion/lslocks4
-rw-r--r--bash-completion/mcookie3
-rw-r--r--bash-completion/mesg8
-rw-r--r--bash-completion/mkfs3
-rw-r--r--bash-completion/mkfs.bfs3
-rw-r--r--bash-completion/mkfs.cramfs3
-rw-r--r--bash-completion/mkfs.minix3
-rw-r--r--bash-completion/mkswap2
-rw-r--r--bash-completion/more8
-rw-r--r--bash-completion/mountpoint3
-rw-r--r--bash-completion/namei6
-rw-r--r--bash-completion/newgrp6
-rw-r--r--bash-completion/nsenter3
-rw-r--r--bash-completion/partx3
-rw-r--r--bash-completion/pg3
-rw-r--r--bash-completion/pivot_root8
-rw-r--r--bash-completion/prlimit3
-rw-r--r--bash-completion/raw8
-rw-r--r--bash-completion/readprofile3
-rw-r--r--bash-completion/rename6
-rw-r--r--bash-completion/renice3
-rw-r--r--bash-completion/resizepart6
-rw-r--r--bash-completion/rev8
-rw-r--r--bash-completion/rtcwake3
-rw-r--r--bash-completion/script3
-rw-r--r--bash-completion/scriptreplay3
-rw-r--r--bash-completion/setarch8
-rw-r--r--bash-completion/setpriv3
-rw-r--r--bash-completion/setsid8
-rw-r--r--bash-completion/setterm3
-rw-r--r--bash-completion/sfdisk3
-rw-r--r--bash-completion/su3
-rw-r--r--bash-completion/swaplabel3
-rw-r--r--bash-completion/swapon3
-rw-r--r--bash-completion/tailf3
-rw-r--r--bash-completion/taskset3
-rw-r--r--bash-completion/tunelp3
-rw-r--r--bash-completion/ul3
-rw-r--r--bash-completion/unshare8
-rw-r--r--bash-completion/utmpdump6
-rw-r--r--bash-completion/uuidd3
-rw-r--r--bash-completion/uuidgen8
-rw-r--r--bash-completion/wall3
-rw-r--r--bash-completion/wdctl3
-rw-r--r--bash-completion/whereis3
-rw-r--r--bash-completion/wipefs4
-rw-r--r--bash-completion/write8
87 files changed, 353 insertions, 23 deletions
diff --git a/bash-completion/blkdiscard b/bash-completion/blkdiscard
index 757480c0..d19ab05a 100644
--- a/bash-completion/blkdiscard
+++ b/bash-completion/blkdiscard
@@ -9,6 +9,9 @@ _blkdiscard_module()
COMPREPLY=( $(compgen -W "num" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/blkid b/bash-completion/blkid
index 14222a44..b4393285 100644
--- a/bash-completion/blkid
+++ b/bash-completion/blkid
@@ -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
-*)
diff --git a/bash-completion/cal b/bash-completion/cal
index d50c8bbc..6c7c1743 100644
--- a/bash-completion/cal
+++ b/bash-completion/cal
@@ -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"
diff --git a/bash-completion/cfdisk b/bash-completion/cfdisk
index 4be5186c..6cd9d6f7 100644
--- a/bash-completion/cfdisk
+++ b/bash-completion/cfdisk
@@ -17,6 +17,9 @@ _cfdisk_module()
COMPREPLY=( $(compgen -W "sectors" -- $cur) )
return 0
;;
+ '-v')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/chcpu b/bash-completion/chcpu
index 19386e24..d05b650e 100644
--- a/bash-completion/chcpu
+++ b/bash-completion/chcpu
@@ -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
diff --git a/bash-completion/chfn b/bash-completion/chfn
index a8eaee5a..01139e8b 100644
--- a/bash-completion/chfn
+++ b/bash-completion/chfn
@@ -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"
diff --git a/bash-completion/chrt b/bash-completion/chrt
index b85775a4..b2e52163 100644
--- a/bash-completion/chrt
+++ b/bash-completion/chrt
@@ -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.
diff --git a/bash-completion/chsh b/bash-completion/chsh
index c0a194cf..5b191e96 100644
--- a/bash-completion/chsh
+++ b/bash-completion/chsh
@@ -9,6 +9,9 @@ _chsh_module()
COMPREPLY=( $(compgen -W "$(chsh -l)" -- $cur) )
return 0
;;
+ '-u'|'--help'|'-v'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/col b/bash-completion/col
index 9ad3a673..41cac724 100644
--- a/bash-completion/col
+++ b/bash-completion/col
@@ -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
diff --git a/bash-completion/colcrt b/bash-completion/colcrt
index 628416e6..28093a89 100644
--- a/bash-completion/colcrt
+++ b/bash-completion/colcrt
@@ -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
diff --git a/bash-completion/colrm b/bash-completion/colrm
index aa57c02a..54706b36 100644
--- a/bash-completion/colrm
+++ b/bash-completion/colrm
@@ -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"
diff --git a/bash-completion/column b/bash-completion/column
index 94e1a511..23d923f0 100644
--- a/bash-completion/column
+++ b/bash-completion/column
@@ -13,6 +13,9 @@ _column_module()
COMPREPLY=( $(compgen -W "string" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/ctrlaltdel b/bash-completion/ctrlaltdel
index e7257522..bc8a9432 100644
--- a/bash-completion/ctrlaltdel
+++ b/bash-completion/ctrlaltdel
@@ -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
diff --git a/bash-completion/cytune b/bash-completion/cytune
index 9a90d34e..7ded86c0 100644
--- a/bash-completion/cytune
+++ b/bash-completion/cytune
@@ -13,6 +13,9 @@ _cytune_module()
COMPREPLY=( $(compgen -W "seconds" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/delpart b/bash-completion/delpart
index e3ee4062..70543f0a 100644
--- a/bash-completion/delpart
+++ b/bash-completion/delpart
@@ -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=''
diff --git a/bash-completion/dmesg b/bash-completion/dmesg
index 18ee59fc..f1189d2c 100644
--- a/bash-completion/dmesg
+++ b/bash-completion/dmesg
@@ -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
diff --git a/bash-completion/eject b/bash-completion/eject
index b767e819..8c2d62f9 100644
--- a/bash-completion/eject
+++ b/bash-completion/eject
@@ -18,6 +18,9 @@ _eject_module()
COMPREPLY=( $(compgen -W "$(eject -X)" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/fallocate b/bash-completion/fallocate
index 132858ca..f3431b73 100644
--- a/bash-completion/fallocate
+++ b/bash-completion/fallocate
@@ -9,6 +9,9 @@ _fallocate_module()
COMPREPLY=( $(compgen -W "bytes" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/fdformat b/bash-completion/fdformat
index 4ad1c3d0..376000a1 100644
--- a/bash-completion/fdformat
+++ b/bash-completion/fdformat
@@ -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) )
diff --git a/bash-completion/fdisk b/bash-completion/fdisk
index ae94f10c..b800f8df 100644
--- a/bash-completion/fdisk
+++ b/bash-completion/fdisk
@@ -29,6 +29,9 @@ _fdisk_module()
COMPREPLY=( $(compgen -W "number" -- $cur) )
return 0
;;
+ '-h'|'-v')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/findmnt b/bash-completion/findmnt
index c2dfa21b..cdc4861c 100644
--- a/bash-completion/findmnt
+++ b/bash-completion/findmnt
@@ -77,6 +77,9 @@ _findmnt_module()
COMPREPLY=( $(compgen -W "$DEV_MPOINT" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/flock b/bash-completion/flock
index cfa9b660..3f094e37 100644
--- a/bash-completion/flock
+++ b/bash-completion/flock
@@ -18,6 +18,9 @@ _flock_module()
COMPREPLY=( $(compgen -c -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/fsck b/bash-completion/fsck
index 40b9a13e..04899a0d 100644
--- a/bash-completion/fsck
+++ b/bash-completion/fsck
@@ -21,6 +21,9 @@ _fsck_module()
COMPREPLY=( $(compgen -W "bad_blocks_file" -- $cur) )
return 0
;;
+ '-?')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/fsck.cramfs b/bash-completion/fsck.cramfs
index 410b084c..bfc18edf 100644
--- a/bash-completion/fsck.cramfs
+++ b/bash-completion/fsck.cramfs
@@ -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
diff --git a/bash-completion/fsck.minix b/bash-completion/fsck.minix
index 6239ae4a..e7021995 100644
--- a/bash-completion/fsck.minix
+++ b/bash-completion/fsck.minix
@@ -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) )
diff --git a/bash-completion/fsfreeze b/bash-completion/fsfreeze
index 7933c157..ec29b1e4 100644
--- a/bash-completion/fsfreeze
+++ b/bash-completion/fsfreeze
@@ -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"
diff --git a/bash-completion/fstrim b/bash-completion/fstrim
index 6587d572..5427e728 100644
--- a/bash-completion/fstrim
+++ b/bash-completion/fstrim
@@ -9,6 +9,9 @@ _fstrim_module()
COMPREPLY=( $(compgen -W "num" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/getopt b/bash-completion/getopt
index ea8c8e2b..d18d2a16 100644
--- a/bash-completion/getopt
+++ b/bash-completion/getopt
@@ -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
-*)
diff --git a/bash-completion/hexdump b/bash-completion/hexdump
index 1a6786bb..0c91187f 100644
--- a/bash-completion/hexdump
+++ b/bash-completion/hexdump
@@ -17,6 +17,9 @@ _hexdump_module()
COMPREPLY=( $(compgen -W "offset" -- $cur) )
return 0
;;
+ '-V')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/hwclock b/bash-completion/hwclock
index 855e8857..b09e63df 100644
--- a/bash-completion/hwclock
+++ b/bash-completion/hwclock
@@ -18,6 +18,9 @@ _hwclock_module()
COMPREPLY=( $(compgen -W "year" -- $cur) )
return 0
;;
+ '-h'|'-?'|'--help'|'-v'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/ionice b/bash-completion/ionice
index 21807181..e7a8ac86 100644
--- a/bash-completion/ionice
+++ b/bash-completion/ionice
@@ -19,6 +19,9 @@ _ionice_module()
COMPREPLY=( $(compgen -W "$PIDS" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/ipcrm b/bash-completion/ipcrm
index fd85091c..6e2aff06 100644
--- a/bash-completion/ipcrm
+++ b/bash-completion/ipcrm
@@ -35,6 +35,9 @@ _ipcrm_module()
COMPREPLY=( $(compgen -W "$KEYIDS" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
'=')
diff --git a/bash-completion/ipcs b/bash-completion/ipcs
index 51502bb0..2cb7e613 100644
--- a/bash-completion/ipcs
+++ b/bash-completion/ipcs
@@ -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
diff --git a/bash-completion/isosize b/bash-completion/isosize
index 2b4a4991..487e40d9 100644
--- a/bash-completion/isosize
+++ b/bash-completion/isosize
@@ -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
diff --git a/bash-completion/ldattach b/bash-completion/ldattach
index dc83dfcd..a53329c6 100644
--- a/bash-completion/ldattach
+++ b/bash-completion/ldattach
@@ -20,6 +20,9 @@ _ldattach_module()
COMPREPLY=( $(compgen -W "$IFLAGS" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/logger b/bash-completion/logger
index f572302c..1f89e2dc 100644
--- a/bash-completion/logger
+++ b/bash-completion/logger
@@ -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
-*)
diff --git a/bash-completion/look b/bash-completion/look
index 68cea563..daa5ecb7 100644
--- a/bash-completion/look
+++ b/bash-completion/look
@@ -9,6 +9,9 @@ _look_module()
COMPREPLY=( $(compgen -W "char" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/losetup b/bash-completion/losetup
index 329bb055..4afcd3ff 100644
--- a/bash-completion/losetup
+++ b/bash-completion/losetup
@@ -34,6 +34,9 @@ _losetup_module()
COMPREPLY=( $(compgen -W "$OUTPUT" -S ',' -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/lsblk b/bash-completion/lsblk
index 54981992..e1e4dd78 100644
--- a/bash-completion/lsblk
+++ b/bash-completion/lsblk
@@ -30,6 +30,9 @@ _lsblk_module()
COMPREPLY=( $(compgen -W "$OUTPUT" -S ',' -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/lscpu b/bash-completion/lscpu
index 14926ec9..5df0f9f7 100644
--- a/bash-completion/lscpu
+++ b/bash-completion/lscpu
@@ -22,6 +22,9 @@ _lscpu_module()
COMPREPLY=( $(compgen -W "$OPTS" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/lslocks b/bash-completion/lslocks
index f55c17ec..cde81b13 100644
--- a/bash-completion/lslocks
+++ b/bash-completion/lslocks
@@ -21,7 +21,9 @@ _lslocks_module()
COMPREPLY=( $(compgen -W "$OUTPUT" -S ',' -- $cur) )
return 0
;;
-
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/mcookie b/bash-completion/mcookie
index 1c01a552..ce5ee9cd 100644
--- a/bash-completion/mcookie
+++ b/bash-completion/mcookie
@@ -10,6 +10,9 @@ _mcookie_module()
COMPREPLY=( $(compgen -f -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/mesg b/bash-completion/mesg
index 62c98ca2..8513c029 100644
--- a/bash-completion/mesg
+++ b/bash-completion/mesg
@@ -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"
diff --git a/bash-completion/mkfs b/bash-completion/mkfs
index 19471195..48684fea 100644
--- a/bash-completion/mkfs
+++ b/bash-completion/mkfs
@@ -10,6 +10,9 @@ _mkfs_module()
COMPREPLY=( $(compgen -W "$FSTYPES" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/mkfs.bfs b/bash-completion/mkfs.bfs
index 7a47a76f..44f15f34 100644
--- a/bash-completion/mkfs.bfs
+++ b/bash-completion/mkfs.bfs
@@ -13,6 +13,9 @@ _bfs_module()
COMPREPLY=( $(compgen -W "name" -- $cur) )
return 0
;;
+ '-h'|'--help'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/mkfs.cramfs b/bash-completion/mkfs.cramfs
index 65ee9883..38ab3b65 100644
--- a/bash-completion/mkfs.cramfs
+++ b/bash-completion/mkfs.cramfs
@@ -25,6 +25,9 @@ _mkfs.cramfs_module()
COMPREPLY=( $(compgen -W "name" -- $cur) )
return 0
;;
+ '-h'|'-V')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/mkfs.minix b/bash-completion/mkfs.minix
index 085a0587..78c986f9 100644
--- a/bash-completion/mkfs.minix
+++ b/bash-completion/mkfs.minix
@@ -17,6 +17,9 @@ _mkfs.minix_module()
COMPREPLY=( $(compgen -W "14 30" -- $cur) )
return 0
;;
+ '-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/mkswap b/bash-completion/mkswap
index 30d517ca..32bc533c 100644
--- a/bash-completion/mkswap
+++ b/bash-completion/mkswap
@@ -17,7 +17,7 @@ _mkswap_module()
COMPREPLY=( $(compgen -W "1" -- $cur) )
return 0
;;
- '-U'|--uuid)
+ '-U'|'--uuid'|'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
diff --git a/bash-completion/more b/bash-completion/more
index f32770d5..945c7b34 100644
--- a/bash-completion/more
+++ b/bash-completion/more
@@ -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"
diff --git a/bash-completion/mountpoint b/bash-completion/mountpoint
index e2f1d568..308c4d69 100644
--- a/bash-completion/mountpoint
+++ b/bash-completion/mountpoint
@@ -9,6 +9,9 @@ _mountpoint_module()
COMPREPLY=( $(compgen -W "fixme" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/namei b/bash-completion/namei
index c44821c5..561f45fd 100644
--- a/bash-completion/namei
+++ b/bash-completion/namei
@@ -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"
diff --git a/bash-completion/newgrp b/bash-completion/newgrp
index 567c08cf..3e080dfd 100644
--- a/bash-completion/newgrp
+++ b/bash-completion/newgrp
@@ -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"
diff --git a/bash-completion/nsenter b/bash-completion/nsenter
index b8296b6d..7950eab9 100644
--- a/bash-completion/nsenter
+++ b/bash-completion/nsenter
@@ -11,6 +11,9 @@ _nsenter_module()
COMPREPLY=( $(compgen -W "$PIDS" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
'=')
diff --git a/bash-completion/partx b/bash-completion/partx
index db2eded6..b643dd8d 100644
--- a/bash-completion/partx
+++ b/bash-completion/partx
@@ -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
-*)
diff --git a/bash-completion/pg b/bash-completion/pg
index 4ae88874..9b1bad93 100644
--- a/bash-completion/pg
+++ b/bash-completion/pg
@@ -9,6 +9,9 @@ _pg_module()
COMPREPLY=( $(compgen -W "prompt" -- $cur) )
return 0
;;
+ '-h'|'-V')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/pivot_root b/bash-completion/pivot_root
index 54f17342..961c8837 100644
--- a/bash-completion/pivot_root
+++ b/bash-completion/pivot_root
@@ -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
diff --git a/bash-completion/prlimit b/bash-completion/prlimit
index bf5ff2f3..3c1a1ac6 100644
--- a/bash-completion/prlimit
+++ b/bash-completion/prlimit
@@ -18,6 +18,9 @@ _prlimit_module()
COMPREPLY=( $(compgen -W "$OUTPUT" -S ',' -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
'=')
diff --git a/bash-completion/raw b/bash-completion/raw
index 27f03545..231f2cc4 100644
--- a/bash-completion/raw
+++ b/bash-completion/raw
@@ -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
diff --git a/bash-completion/readprofile b/bash-completion/readprofile
index c1eb514b..41454a37 100644
--- a/bash-completion/readprofile
+++ b/bash-completion/readprofile
@@ -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
diff --git a/bash-completion/rename b/bash-completion/rename
index 0fe4cc64..b42d2d18 100644
--- a/bash-completion/rename
+++ b/bash-completion/rename
@@ -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"
diff --git a/bash-completion/renice b/bash-completion/renice
index aba00d78..deb97932 100644
--- a/bash-completion/renice
+++ b/bash-completion/renice
@@ -25,6 +25,9 @@ _renice_module()
COMPREPLY=( $(compgen -u -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
OPTS="-g --pgrp
-n --priority
diff --git a/bash-completion/resizepart b/bash-completion/resizepart
index b178b529..e55005aa 100644
--- a/bash-completion/resizepart
+++ b/bash-completion/resizepart
@@ -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=''
diff --git a/bash-completion/rev b/bash-completion/rev
index f891f191..2ba57816 100644
--- a/bash-completion/rev
+++ b/bash-completion/rev
@@ -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"
diff --git a/bash-completion/rtcwake b/bash-completion/rtcwake
index 1f38df82..e54d105c 100644
--- a/bash-completion/rtcwake
+++ b/bash-completion/rtcwake
@@ -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
diff --git a/bash-completion/script b/bash-completion/script
index 48f50c3e..c02f1be9 100644
--- a/bash-completion/script
+++ b/bash-completion/script
@@ -10,6 +10,9 @@ _script_module()
COMPREPLY=( $(compgen -c -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
'=')
diff --git a/bash-completion/scriptreplay b/bash-completion/scriptreplay
index 78e5b23a..09b0d01c 100644
--- a/bash-completion/scriptreplay
+++ b/bash-completion/scriptreplay
@@ -9,6 +9,9 @@ _scriptreplay_module()
COMPREPLY=( $(compgen -W "digit" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/setarch b/bash-completion/setarch
index b84d399b..6224a11c 100644
--- a/bash-completion/setarch
+++ b/bash-completion/setarch
@@ -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
diff --git a/bash-completion/setpriv b/bash-completion/setpriv
index b05affe7..00f87af2 100644
--- a/bash-completion/setpriv
+++ b/bash-completion/setpriv
@@ -50,6 +50,9 @@ _setpriv_module()
COMPREPLY=( $(compgen -W "profile" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/setsid b/bash-completion/setsid
index dcefc2f0..a14ae42e 100644
--- a/bash-completion/setsid
+++ b/bash-completion/setsid
@@ -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"
diff --git a/bash-completion/setterm b/bash-completion/setterm
index 33d2e56f..ae07d1ee 100644
--- a/bash-completion/setterm
+++ b/bash-completion/setterm
@@ -69,6 +69,9 @@ _setterm_module()
COMPREPLY=( $(compgen -W "freqnumber" -- $cur) )
return 0
;;
+ '-help'|'-version')
+ return 0
+ ;;
esac
OPTS=" -term
-reset
diff --git a/bash-completion/sfdisk b/bash-completion/sfdisk
index 5498b0e9..102fd85a 100644
--- a/bash-completion/sfdisk
+++ b/bash-completion/sfdisk
@@ -18,6 +18,9 @@ _sfdisk_module()
COMPREPLY=( $(compgen -f -- $cur) )
return 0
;;
+ '-h'|'--help'|'-v'|'--version')
+ return 0
+ ;;
esac
case $cur in
'=')
diff --git a/bash-completion/su b/bash-completion/su
index c72f6a10..dbd3d2f6 100644
--- a/bash-completion/su
+++ b/bash-completion/su
@@ -17,6 +17,9 @@ _su_module()
COMPREPLY=( $(compgen -W "$(chsh -l)" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/swaplabel b/bash-completion/swaplabel
index c857d159..59099419 100644
--- a/bash-completion/swaplabel
+++ b/bash-completion/swaplabel
@@ -13,6 +13,9 @@ _swaplabel_module()
COMPREPLY=( $(compgen -W '$(uuidgen)' -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/swapon b/bash-completion/swapon
index 83e7e241..0e7c2008 100644
--- a/bash-completion/swapon
+++ b/bash-completion/swapon
@@ -19,6 +19,9 @@ _swapon_module()
COMPREPLY=( $(compgen -W "$OUTPUT" -S ',' -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/tailf b/bash-completion/tailf
index 29c5bed0..32214d94 100644
--- a/bash-completion/tailf
+++ b/bash-completion/tailf
@@ -9,6 +9,9 @@ _tailf_module()
COMPREPLY=( $(compgen -W "number" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/taskset b/bash-completion/taskset
index 5311316a..c7d819b5 100644
--- a/bash-completion/taskset
+++ b/bash-completion/taskset
@@ -23,6 +23,9 @@ _taskset_module()
COMPREPLY=( $(compgen -W "$PIDS" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/tunelp b/bash-completion/tunelp
index 0f048429..e45cbec9 100644
--- a/bash-completion/tunelp
+++ b/bash-completion/tunelp
@@ -21,6 +21,9 @@ _tunelp_module()
COMPREPLY=( $(compgen -W "off on" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/ul b/bash-completion/ul
index 07d07313..be3529df 100644
--- a/bash-completion/ul
+++ b/bash-completion/ul
@@ -14,6 +14,9 @@ _ul_module()
COMPREPLY=( $(compgen -W "$TERM_LIST" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/unshare b/bash-completion/unshare
index 295d02f9..5342961f 100644
--- a/bash-completion/unshare
+++ b/bash-completion/unshare
@@ -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
diff --git a/bash-completion/utmpdump b/bash-completion/utmpdump
index e306ef83..bf186380 100644
--- a/bash-completion/utmpdump
+++ b/bash-completion/utmpdump
@@ -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"
diff --git a/bash-completion/uuidd b/bash-completion/uuidd
index 23c1a490..c69a7c1b 100644
--- a/bash-completion/uuidd
+++ b/bash-completion/uuidd
@@ -20,6 +20,9 @@ _uuidd_module()
COMPREPLY=( $(compgen -W "number" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/uuidgen b/bash-completion/uuidgen
index d9edde9b..2cf30a20 100644
--- a/bash-completion/uuidgen
+++ b/bash-completion/uuidgen
@@ -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"
diff --git a/bash-completion/wall b/bash-completion/wall
index d3cbbd56..4086ffe5 100644
--- a/bash-completion/wall
+++ b/bash-completion/wall
@@ -9,6 +9,9 @@ _wall_module()
COMPREPLY=( $(compgen -W "seconds" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/wdctl b/bash-completion/wdctl
index 42889aca..01d19a05 100644
--- a/bash-completion/wdctl
+++ b/bash-completion/wdctl
@@ -34,6 +34,9 @@ _wdctl_module()
COMPREPLY=( $(compgen -W "seconds" -- $cur) )
return 0
;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/whereis b/bash-completion/whereis
index 96e4117a..2273a07c 100644
--- a/bash-completion/whereis
+++ b/bash-completion/whereis
@@ -10,6 +10,9 @@ _whereis_module()
COMPREPLY=( $(compgen -o dirnames -- ${cur:-"/"}) )
return 0
;;
+ '-h'|'-V')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/wipefs b/bash-completion/wipefs
index db9426e2..20dd40d2 100644
--- a/bash-completion/wipefs
+++ b/bash-completion/wipefs
@@ -15,7 +15,9 @@ _wipefs_module()
COMPREPLY=( $(compgen -W "$TYPES" -- $cur) )
return 0
;;
-
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
esac
case $cur in
-*)
diff --git a/bash-completion/write b/bash-completion/write
index d41159b2..1fe08072 100644
--- a/bash-completion/write
+++ b/bash-completion/write
@@ -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) )