From 5feae697b03de1d897327ab7e6c73738c4d06695 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Thu, 4 Oct 2018 21:36:22 +0100 Subject: 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 --- bash-completion/fstrim | 2 ++ bash-completion/hwclock | 3 ++- bash-completion/mount | 18 ++++++++++++++++++ bash-completion/rename | 2 +- bash-completion/script | 4 ++++ bash-completion/setpriv | 18 ++++++++++++++++-- bash-completion/su | 1 + bash-completion/umount | 1 + 8 files changed, 45 insertions(+), 4 deletions(-) (limited to 'bash-completion') diff --git a/bash-completion/fstrim b/bash-completion/fstrim index 726ddd905..d5c1481b7 100644 --- a/bash-completion/fstrim +++ b/bash-completion/fstrim @@ -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) ) diff --git a/bash-completion/hwclock b/bash-completion/hwclock index 4bd87e42e..faf29afe9 100644 --- a/bash-completion/hwclock +++ b/bash-completion/hwclock @@ -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 diff --git a/bash-completion/mount b/bash-completion/mount index c7e4bead6..35cb19f7a 100644 --- a/bash-completion/mount +++ b/bash-completion/mount @@ -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 diff --git a/bash-completion/rename b/bash-completion/rename index 143121976..9fc1ceca3 100644 --- a/bash-completion/rename +++ b/bash-completion/rename @@ -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 ;; diff --git a/bash-completion/script b/bash-completion/script index 57b91a9eb..ef8afc69e 100644 --- a/bash-completion/script +++ b/bash-completion/script @@ -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 ;; diff --git a/bash-completion/setpriv b/bash-completion/setpriv index 1c67f8288..41bab2369 100644 --- a/bash-completion/setpriv +++ b/bash-completion/setpriv @@ -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 diff --git a/bash-completion/su b/bash-completion/su index dad1b5f04..309505085 100644 --- a/bash-completion/su +++ b/bash-completion/su @@ -25,6 +25,7 @@ _su_module() -*) OPTS=" --user --preserve-environment + --whitelist-environment --group --supp-group --login diff --git a/bash-completion/umount b/bash-completion/umount index 98c90d61a..942857718 100644 --- a/bash-completion/umount +++ b/bash-completion/umount @@ -33,6 +33,7 @@ _umount_module() --recursive --read-only --types + --quiet --verbose --help --version" -- cgit v1.2.3-55-g7522