]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
bash-completion: catch up with option changes
authorSami Kerola <kerolasa@iki.fi>
Thu, 4 Oct 2018 20:36:22 +0000 (21:36 +0100)
committerSami Kerola <kerolasa@iki.fi>
Thu, 4 Oct 2018 20:36:22 +0000 (21:36 +0100)
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>
bash-completion/fstrim
bash-completion/hwclock
bash-completion/mount
bash-completion/rename
bash-completion/script
bash-completion/setpriv
bash-completion/su
bash-completion/umount

index 726ddd90571d1be3d0a079464839f4802a942707..d5c1481b75286a8cc0e43ee800abb6cee547c223 100644 (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) )
index 4bd87e42ea9f3eccce3c8ecf2c9eb4bd94b518d3..faf29afe9af4d59a94cff6be1b82faf8a100fb07 100644 (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
index c7e4bead6c89763e177236f006989a03b70b1726..35cb19f7a7bbcff1771db9117b70fff139109ec9 100644 (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
index 143121976a43cf4ee71ff9994831042844a0d500..9fc1ceca38a0dd725940525b3985f46738bf9538 100644 (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
                        ;;
index 57b91a9eb570a054982438d952aa03f8a9ce26d3..ef8afc69e1890424ad6284500627142ebd680c9f 100644 (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
                        ;;
index 1c67f8288ddff824b766272980863b621675c3aa..41bab2369f3ac1543ec5858113363205137d7acd 100644 (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
index dad1b5f045d0ec0161f81998f90c512bb56e0674..309505085d56aac6a29051d2d43f9666161ca59a 100644 (file)
@@ -25,6 +25,7 @@ _su_module()
                -*)
                        OPTS="  --user
                                --preserve-environment
+                               --whitelist-environment
                                --group
                                --supp-group
                                --login
index 98c90d61a45686a5bc2468494a542ad821b28b66..942857718b6e19ec43ec758d0e30baf0335c5236 100644 (file)
@@ -33,6 +33,7 @@ _umount_module()
                                --recursive
                                --read-only
                                --types
+                               --quiet
                                --verbose
                                --help
                                --version"