bash-completion: catch up with option changes

Check what has changed in usage functions in between v2.32..a77bd80d5 and
update bash-completion files accordingly.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2018-10-04 21:36:22 +01:00
parent a77bd80d5a
commit 5feae697b0
No known key found for this signature in database
GPG Key ID: A9553245FDE9B739
8 changed files with 45 additions and 4 deletions

View File

@ -16,10 +16,12 @@ _fstrim_module()
case $cur in
-*)
OPTS="--all
--fstab
--offset
--length
--minimum
--verbose
--dry-run
--help
--version"
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )

View File

@ -11,7 +11,7 @@ _hwclock_module()
COMPREPLY=( $(compgen -f -- $cur) )
return 0
;;
'--date')
'--date'|'--delay')
COMPREPLY=( $(compgen -W "time" -- $cur) )
return 0
;;
@ -42,6 +42,7 @@ _hwclock_module()
--rtc
--directisa
--date
--delay
--epoch
--update-drift
--noadjfile

View File

@ -34,6 +34,20 @@ _mount_module()
COMPREPLY=( $(compgen -W "$UUIDS" -- $cur) )
return 0
;;
'-N'|'--namespace')
local NAMESPACE
NAMESPACE="$(lsns --type mnt --output PATH,PID --noheadings)"
COMPREPLY=( $(compgen -W "$NAMESPACE" -- $cur) )
return 0
;;
'--options-mode')
COMPREPLY=( $(compgen -W "ignore append prepend replace" -- $cur) )
return 0
;;
'--options-source')
COMPREPLY=( $(compgen -W "fstab mtab disable" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
@ -50,6 +64,9 @@ _mount_module()
--show-labels
--no-mtab
--options
--options-mode
--options-source
--options-source-force
--test-opts
--read-only
--types
@ -58,6 +75,7 @@ _mount_module()
--verbose
--version
--read-write
--namespace
--label
--uuid
--bind

View File

@ -11,7 +11,7 @@ _rename_module()
esac
case $cur in
-*)
OPTS="--verbose --symlink --help --version --no-act --no-override"
OPTS="--verbose --symlink --help --version --no-act --no-override --interactive"
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
return 0
;;

View File

@ -10,6 +10,10 @@ _script_module()
COMPREPLY=( $(compgen -c -- $cur) )
return 0
;;
'-o'|'--output-limit')
COMPREPLY=( $(compgen -W "size" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
return 0
;;

View File

@ -21,13 +21,13 @@ _setpriv_module()
;;
'--ruid'|'--euid'|'--reuid')
local UIDS
UIDS=$(getent passwd | awk -F: '{print $3}')
UIDS=$(getent passwd | awk -F: '{print $1}')
COMPREPLY=( $(compgen -W "$UIDS" -- $cur) )
return 0
;;
'--rgid'|'--egid'|'--regid')
local GIDS
GIDS=$(getent group | awk -F: '{print $3}')
GIDS=$(getent group | awk -F: '{print $1}')
COMPREPLY=( $(compgen -W "$GIDS" -- $cur) )
return 0
;;
@ -65,6 +65,18 @@ _setpriv_module()
COMPREPLY=( $(compgen -P "$prefix" -W "$SBITS" -S ',' -- $realcur) )
return 0
;;
'--pdeathsig')
local i signals
for i in $(kill -l); do
case $i in
SIG*)
signals+="$i "
;;
esac
done
COMPREPLY=( $(compgen -W "keep clear $signals" -- $cur) )
return 0
;;
'--selinux-label')
# FIXME: how to list selinux labels?
COMPREPLY=( $(compgen -W "label" -- $cur) )
@ -96,6 +108,8 @@ _setpriv_module()
--keep-groupskeep
--groups
--securebits
--pdeathsig
--reset-env
--selinux-label
--apparmor-profile
--help

View File

@ -25,6 +25,7 @@ _su_module()
-*)
OPTS=" --user
--preserve-environment
--whitelist-environment
--group
--supp-group
--login

View File

@ -33,6 +33,7 @@ _umount_module()
--recursive
--read-only
--types
--quiet
--verbose
--help
--version"