]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
bash-completion: update sys-utils
authorSami Kerola <kerolasa@iki.fi>
Tue, 11 Apr 2017 18:02:21 +0000 (19:02 +0100)
committerSami Kerola <kerolasa@iki.fi>
Mon, 17 Apr 2017 17:26:37 +0000 (18:26 +0100)
blkdiscard:

Add --step [1] and --zeroout [2] options.

Commit [1]: c472a7e35ae40652bdcf66c08a23bd50d48d1884
Commit [2]: 7154cc892688f3c58cbbcdc2055f2635c1d0ef5b

chmem:

Commit: 30e1ea8ba1984488fdb16506ebafe4dc23280e5a

dmesg:

Add --time-format.

Commit: babf605d2ca969a434f2f14579ddf44252adff4f

fallocate:

Add --insert-range [1], --collapse-range [2], --zero-range [3], and
--posix [4] options.  Also make the options to be in same order as
usage() output.

Commit [1]: b439065634e693dda385a6e5269e1d9258d6d471
Commit [2]: 83cc932d7412cb9d23bf9f06a9a54c8566e1a788
Commit [3]: 1fd4f609ee65be0f376ed28322fc3593026d39e4
Commit [4]: 833f9a7aae713278eec5f85266597482f18c7370
Command [5]: fallocate --help | awk '/--/ {print "\t\t\t\t" $2}'

flock:

Add --no-fork option.

Commit: 703251401cb11ee5d00a6b8f8bd9dc80c160f476

hwclock:

Add --udate-drift [1], remove --badyear [2], and use the same
argument for --date as in manual page[3].

Commit [1]: f276d71a3ef6a65299deb5e14a188e0a786ecebd
Commit [2]: f6374e1fb33d5ca726b72212b787e11fea78c0ca
Commit [3]: cc5ec6936ea3c218b3e8c46880659db5ee01329f

ldattach:

Add --intro-command and --pause.

Commit: 8596f6391461bac53f5bab48f8c8b17a7c459f28

losetup:

Add --nooverlap [1], --json [2], --noheadings and --raw [3] options,
and direct io aka DIO output field [4].

Commit [1]: 9a94b634a343e83bfa2a9d311074e3e520abdddd
Commit [2]: 4827093d4b3090389ae0cabb7d8b522cf794ef90
Commit [3]: 9f56106df6b49864ba604f6824f9fad5aeabd17a
Commit [4]: faeef4d2e9d5e38bed57846ba903009990f24422

lscpu:

Add --json [1] and --physical [2] options.  Add DRAWER [3] to output
fields.

Commit [1]: 19a5510b964c6163e7117913d3de35aba3cd0006
Commit [2]: 0d2b5d2a72bc6619229a4d7456fbb70eda561825
Commit [3]: b3adf6ef6676ca8c10ecdda3e1c92a861df3b885

lsipc:

Update output columns (earlier field names were almost completely
incorrect).  Remove --colon-separate and --print0 [1] options.  Add
--time-format, --bytes, --numeric-perms [2], and --list [3] options.

Commit [1]: 2a7150ac2e57418f471cca0aae259b7bcd0b90db
Commit [2]: 9d20ffda794208d26e6b3ed09fbc38d94d0b8fc6
Commit [3]: 2916afa3f510182987f88c17bade5dffb4aaf0b8

lsmem:

Commit: cad2d1ac9291112bd9199b36a12335f6770356f3

lsns:

Add cgroup --type argument.

Commit: 2b8889c44b6752e92bfb982a5eaa2255a129e072

mount:

Use /proc and kernel module listing for --type argument list.  Some
of the items in the lists do not make much sense, but this is still
better than a static list provided by package maintainer.

mountpoint:

Remove fixme item that was left in place when this completion was
originally wrote.

nsenter:

Add --cgroup [1], --setuid, --setgid [2], --preserve-credentials
[3] and, --all [4] option.

Commit [1]: f9e7b66dbded19d798b883be68b0613749d7b8bb
Commit [2]: 6b9e5bf670c70690d44b8ce4055e1997fb0b6496
Commit [3]: e99a6626d6262266f012a20ae69c8e4573ee22fd
Commit [4]: 974cc006f122f36e2187cedb9d3e58dc2d24814c

rtcwake:

Add --auto [1], --adjfile [2], and --list-modes [3] options.

Commit [1]: 49ebda9b89fc7360d15ca651b8492633b3bbc1d7
Commit [2]: 3a2f3e82bba616c93d80fd88938b38144e66eee7
Commit [3]: 43a44bfc6da8f4666c5dd6bc03c89713e6c4bd46

setarch:

Add --list [1] option.

Commit [1]: 5edb0ea6bbd57dd916417737f98c9109dc1ecb5b

setsid:

Add --wait option.

Commit: 0dde19974bcbb07ce977992ab04b7dfa752d99b3

umount:

Use /proc and kernel module listing for --type argument list.

unshare:

Add --cgroup [1], --fork [2], --mount-proc [3], --map-root-user,
--setgroups [4], and --propagation [5] options.

Commit [1]: f9e7b66dbded19d798b883be68b0613749d7b8bb
Commit [2]: 5088ec338fe5dcd7e9a2d8daf7e7fa7dd6f87c27
Commit [3]: 6728ca101e7edc223a8eb99201197831d8daa61f
Commit [4]: fbceefded6645de693d576cd988a703a6f60d207
Commit [5]: f0f22e9c6f109f8c1234caa3173368ef43b023eb

zramctl:

Add new output fields MEM-LIMIT, MEM-USED, and MIGRATED.

Commit: bffc9174b89d8d9fefe7a77b9350ab8f0dbef54f

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
22 files changed:
bash-completion/Makemodule.am
bash-completion/blkdiscard
bash-completion/chmem [new file with mode: 0644]
bash-completion/dmesg
bash-completion/fallocate
bash-completion/flock
bash-completion/hwclock
bash-completion/ldattach
bash-completion/losetup
bash-completion/lscpu
bash-completion/lsipc
bash-completion/lsmem [new file with mode: 0644]
bash-completion/lsns
bash-completion/mount
bash-completion/mountpoint
bash-completion/nsenter
bash-completion/rtcwake
bash-completion/setarch
bash-completion/setsid
bash-completion/umount
bash-completion/unshare
bash-completion/zramctl

index d94b995dc73118eb336b4552f0f635363066349b..a884a138ef75b3593f3b8abe91eba2a6875b74c5 100644 (file)
@@ -208,6 +208,9 @@ endif
 if BUILD_CHCPU
 dist_bashcompletion_DATA += bash-completion/chcpu
 endif
+if BUILD_CHMEM
+dist_bashcompletion_DATA += bash-completion/chmem
+endif
 if BUILD_EJECT
 dist_bashcompletion_DATA += bash-completion/eject
 endif
@@ -223,6 +226,9 @@ endif
 if BUILD_LSCPU
 dist_bashcompletion_DATA += bash-completion/lscpu
 endif
+if BUILD_LSMEM
+dist_bashcompletion_DATA += bash-completion/lsmem
+endif
 if BUILD_LOSETUP
 dist_bashcompletion_DATA += bash-completion/losetup
 endif
index aa2f6f6453078594a21f25b8a4795782ad1064d8..64a5c34d5f2b16e58e2cb804737bc9967f593aad 100644 (file)
@@ -5,7 +5,7 @@ _blkdiscard_module()
        cur="${COMP_WORDS[COMP_CWORD]}"
        prev="${COMP_WORDS[COMP_CWORD-1]}"
        case $prev in
-               '-o'|'--offset'|'-l'|'--length')
+               '-o'|'--offset'|'-l'|'--length'|'-p'|'--step')
                        COMPREPLY=( $(compgen -W "num" -- $cur) )
                        return 0
                        ;;
@@ -15,7 +15,16 @@ _blkdiscard_module()
        esac
        case $cur in
                -*)
-                       OPTS="--offset --length --secure --verbose --help --version"
+                       OPTS="
+                               --offset
+                               --length
+                               --step
+                               --secure
+                               --zeroout
+                               --verbose
+                               --help
+                               --version
+                       "
                        COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
                        return 0
                        ;;
diff --git a/bash-completion/chmem b/bash-completion/chmem
new file mode 100644 (file)
index 0000000..00b870d
--- /dev/null
@@ -0,0 +1,29 @@
+_chmem_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="
+                               --enable
+                               --disable
+                               --blocks
+                               --verbose
+                               --help
+                               --version
+                       "
+                       COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
+                       return 0
+                       ;;
+       esac
+       COMPREPLY=( $(compgen -W "size range blockrange" -- $cur) )
+       return 0
+}
+complete -F _chmem_module chmem
index eab41ba086bb113dee27b335c936ee14584e4e63..5073e5b3e48c778ead3865bf9b252bf0f48e8673 100644 (file)
@@ -1,3 +1,4 @@
+
 _dmesg_module()
 {
        local cur prev OPTS
@@ -23,6 +24,10 @@ _dmesg_module()
                        COMPREPLY=( $(compgen -W "size" -- $cur) )
                        return 0
                        ;;
+               '--time-format')
+                       COMPREPLY=( $(compgen -W "delta reltime ctime notime iso" -- $cur) )
+                       return 0
+                       ;;
                '-h'|'--help'|'-V'|'--version')
                        return 0
                        ;;
@@ -46,6 +51,7 @@ _dmesg_module()
                --buffer-size
                --ctime
                --notime
+               --time-format
                --userspace
                --follow
                --decode
index 561a9a4b16a4de7919a4ff4a94278fb16309b5a9..670874c9602a5e79aa5e1382414e2319a1cd1f45 100644 (file)
@@ -15,14 +15,20 @@ _fallocate_module()
        esac
        case $cur in
                -*)
-                       OPTS="--keep-size
-                               --punch-hole
+                       OPTS="
+                               --collapse-range
                                --dig-holes
-                               --offset
+                               --insert-range
                                --length
-                               --help
+                               --keep-size
+                               --offset
+                               --punch-hole
+                               --zero-range
+                               --posix
                                --verbose
-                               --version"
+                               --help
+                               --version
+                       "
                        COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
                        return 0
                        ;;
index 8e7f8b8592dae8f045619419422ff47ecfcd0b51..cb68245c8967ce9f4c98a86bf4e619a5e92364e1 100644 (file)
@@ -32,6 +32,7 @@ _flock_module()
                                --conflict-exit-code
                                --close
                                --command
+                               --no-fork
                                --help
                                --version"
                        COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
index 89b17bd0793656017c4e7653654a343729f5c704..b90f00c0cc5ccca72482114d20ab5508626e0149 100644 (file)
@@ -12,7 +12,7 @@ _hwclock_module()
                        return 0
                        ;;
                '--date')
-                       COMPREPLY=( $(compgen -W "date" -- $cur) )
+                       COMPREPLY=( $(compgen -W "time" -- $cur) )
                        return 0
                        ;;
                '--epoch')
@@ -40,9 +40,9 @@ _hwclock_module()
                                --localtime
                                --rtc
                                --directisa
-                               --badyear
                                --date
                                --epoch
+                               --update-drift
                                --noadjfile
                                --adjfile
                                --test
index 0b9d2603452dd8cdcaa6f8b445401ae8ce1efe79..02b4b5b93db34ca4fb455c0e2671188742c74f20 100644 (file)
@@ -9,6 +9,14 @@ _ldattach_module()
                        COMPREPLY=( $(compgen -W "speed" -- $cur) )
                        return 0
                        ;;
+               '-c'|'--intro-command')
+                       COMPREPLY=( $(compgen -W "string" -- $cur) )
+                       return 0
+                       ;;
+               '-p'|'--pause')
+                       COMPREPLY=( $(compgen -W "seconds" -- $cur) )
+                       return 0
+                       ;;
                '-i'|'--iflag')
                        local IFLAGS
                        IFLAGS="BRKINT ICRNL IGNBRK IGNCR IGNPAR IMAXBEL
@@ -28,6 +36,8 @@ _ldattach_module()
                -*)
                        OPTS="--debug
                                --speed
+                               --intro-command
+                               --pause
                                --sevenbits
                                --eightbits
                                --noparity
index 629d34b78d74bcc086f24d8e8fe0556e44f15066..7fee1d0ae25cad95c85f0f76abdbcaf9f285b409 100644 (file)
@@ -30,7 +30,7 @@ _losetup_module()
                        prefix="${cur%$realcur}"
                        OUTPUT_ALL="NAME AUTOCLEAR BACK-FILE BACK-INO
                                BACK-MAJ:MIN MAJ:MIN OFFSET PARTSCAN RO
-                               SIZELIMIT"
+                               SIZELIMIT DIO"
                        for WORD in $OUTPUT_ALL; do
                                if ! [[ $prefix == *"$WORD"* ]]; then
                                        OUTPUT="$WORD $OUTPUT"
@@ -52,14 +52,18 @@ _losetup_module()
                                --find
                                --set-capacity
                                --associated
-                               --list
+                               --nooverlap
                                --offset
-                               --output
                                --sizelimit
                                --partscan
                                --read-only
                                --show
                                --verbose
+                               --json
+                               --list
+                               --noheadings
+                               --output
+                               --raw
                                --help
                                --version"
                        COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
index d28599db2f3ebdb087fb247092664f5b8e65eac4..d16af350f3db0421730bdb02ac414abf1ed52595 100644 (file)
@@ -11,7 +11,7 @@ _lscpu_module()
                        realcur="${cur##*,}"
                        prefix="${cur%$realcur}"
                        OPTS_ALL="CPU CORE SOCKET NODE
-                               BOOK CACHE POLARIZATION ADDRESS
+                               BOOK DRAWER CACHE POLARIZATION ADDRESS
                                CONFIGURED ONLINE MAXMHZ MINMHZ"
                        for WORD in $OPTS_ALL; do
                                if ! [[ $prefix == *"$WORD"* ]]; then
@@ -31,10 +31,12 @@ _lscpu_module()
                        OPTS_ALL="--all
                                --online
                                --offline
+                               --json
                                --extended=
                                --parse=
                                --sysroot
                                --hex
+                               --physical
                                --help
                                --version"
                        COMPREPLY=( $(compgen -W "${OPTS_ALL[*]}" -- $cur) )
index 6ce0551a5e6fa088baf73ef66faa132c1a60c774..ffe44b7d1f4c70aee0b56f633fa3dd485a2f82d7 100644 (file)
@@ -12,15 +12,27 @@ _lsipc_module()
                '-h'|'--help'|'-V'|'--version')
                        return 0
                        ;;
+               '--time-format')
+                       COMPREPLY=( $(compgen -W "short full iso" -- $cur) )
+                       return 0
+                       ;;
                '-o'|'--output')
                        local prefix realcur OUTPUT_ALL OUTPUT
                        realcur="${cur##*,}"
                        prefix="${cur%$realcur}"
-                       OUTPUT_ALL="GENERAL KEY ID OWNER PERMS CUID
-                       CGID UID GID CHANGE MESSAGE USEDBYTES
-                       MSGS SEND RECV LSPID LRPID SHARED BYTES
-                       NATTCH STATUS ATTACH DETACH CPID LPID NSEMS
-                       LASTOP"
+                       OUTPUT_ALL="
+                               KEY ID OWNER PERMS CUID CUSER CGID
+                               CGROUP UID USER GID GROUP CTIME
+
+                               SIZE NATTCH STATUS ATTACH DETACH
+                               COMMAND CPID LPID
+
+                               USEDBYTES MSGS SEND RECV LSPID LRPID
+
+                               NSEMS OTIME
+
+                               RESOURCE DESCRIPTION LIMIT USED USE%
+                       "
                        for WORD in $OUTPUT_ALL; do
                                if ! [[ $prefix == *"$WORD"* ]]; then
                                        OUTPUT="$WORD $OUTPUT"
@@ -31,35 +43,29 @@ _lsipc_module()
                        return 0
                        ;;
        esac
-       case $cur in
-               -*)
-                       OPTS="--id
-                               --help
-                               --version
-                               --shmems
-                               --queues
-                               --semaphores
-                               --colon-separate
-                               --creator
-                               --export
-                               --global
-                               --json
-                               --newline
-                               --noheadings
-                               --notruncate
-                               --output
-                               --pid
-                               --print0
-                               --raw
-                               --time
-                               --time-format"
-                       COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
-                       return 0
-                       ;;
-       esac
-       local IFS=$'\n'
-       compopt -o filenames
-       COMPREPLY=( $(compgen -f -- $cur) )
+       OPTS="
+               --shmems
+               --queues
+               --semaphores
+               --global
+               --id
+               --noheadings
+               --notruncate
+               --time-format
+               --bytes
+               --creator
+               --export
+               --json
+               --newline
+               --list
+               --output
+               --numeric-perms
+               --raw
+               --time
+               --help
+               --version
+       "
+       COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
        return 0
 }
 complete -F _lsipc_module lsipc
diff --git a/bash-completion/lsmem b/bash-completion/lsmem
new file mode 100644 (file)
index 0000000..85cf3e0
--- /dev/null
@@ -0,0 +1,52 @@
+_lsmem_module()
+{
+       local cur prev OPTS
+       COMPREPLY=()
+       cur="${COMP_WORDS[COMP_CWORD]}"
+       prev="${COMP_WORDS[COMP_CWORD-1]}"
+       case $prev in
+               '-o'|'--output')
+                       local prefix realcur OUTPUT_ALL OUTPUT
+                       realcur="${cur##*,}"
+                       prefix="${cur%$realcur}"
+                       OUTPUT_ALL='RANGE SIZE STATE REMOVABLE BLOCK NODE'
+                       for WORD in $OUTPUT_ALL; do
+                               if ! [[ $prefix == *"$WORD"* ]]; then
+                                       OUTPUT="$WORD $OUTPUT"
+                               fi
+                       done
+                       compopt -o nospace
+                       COMPREPLY=( $(compgen -P "$prefix" -W "$OUTPUT" -S ',' -- "$realcur") )
+                       return 0
+                       ;;
+               '-s'|'--sysroot')
+                       local IFS=$'\n'
+                       compopt -o filenames
+                       COMPREPLY=( $(compgen -o dirnames -- ${cur:-"/"}) )
+                       return 0
+                       ;;
+               '--summary')
+                       COMPREPLY=( $(compgen -W "never always only" -- $cur) )
+                       return 0
+                       ;;
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
+       esac
+       OPTS="
+               --json
+               --pairs
+               --all
+               --bytes
+               --noheadings
+               --output
+               --raw
+               --sysroot
+               --summary
+               --help
+               --version
+       "
+       COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
+       return 0
+}
+complete -F _lsmem_module lsmem
index 8e6a335e4d820c8a7068ca6a55db5a267a0b36d7..8cf0a31f9a16216dcc1d449ef83c662035956af0 100644 (file)
@@ -26,7 +26,7 @@ _lsns_module()
                        return 0
                        ;;
                '-t'|'--type')
-                       COMPREPLY=( $(compgen -W "mnt net ipc user pid uts" -- $cur) )
+                       COMPREPLY=( $(compgen -W "mnt net ipc user pid uts cgroup" -- $cur) )
                        return 0
                        ;;
                '-h'|'--help'|'-V'|'--version')
index e4a98adf6828c7262f97577f136e2d00f3fab437..9a33913395224663a096766bd3fcab913d103eeb 100644 (file)
@@ -6,25 +6,20 @@ _mount_module()
        prev="${COMP_WORDS[COMP_CWORD-1]}"
        case $prev in
                '-t'|'--types')
-                       local TYPES
+                       local prefix realcur TYPES
                        TYPES="
-adfs     noadfs        hfsplus   nohfsplus     smbfs     nosmbfs
-affs     noaffs        hpfs      nohpfs        squashfs  nosquashfs
-autofs   noautofs      iso9660   noiso9660     sysv      nosysv
-cifs     nocifs        jfs       nojfs         tmpfs     notmpfs
-coda     nocoda        minix     nominix       ubifs     noubifs
-coherent  nocoherent   msdos     nomsdos       udf       noudf
-cramfs   nocramfs      ncpfs     noncpfs       ufs       noufs
-debugfs          nodebugfs     nfs       nonfs         umsdos    noumsdos
-devpts   nodevpts      nfs4      nonfs4        usbfs     nousbfs
-efs      noefs         ntfs      nontfs        vfat      novfat
-                       proc      noproc        xenix     noxenix
-ext2     noext2        qnx4      noqnx4        xfs       noxfs
-ext3     noext3        ramfs     noramfs
-ext4     noext4        reiserfs  noreiserfs
-hfs      nohfs         romfs     noromfs
-"
-                       COMPREPLY=( $(compgen -W "$TYPES" -- $cur) )
+                               $(\ls /lib/modules/$(uname -r)/kernel/fs | awk '{print $1, "no" $1}')
+                               $(awk '{print $NF, "no" $NF}' /proc/filesystems)
+                       "
+                       realcur="${cur##*,}"
+                       prefix="${cur%$realcur}"
+                       for WORD in $TYPES; do
+                               if ! [[ $prefix == *"$WORD"* ]]; then
+                                       TYPE_COLS="$WORD $TYPE_COLS"
+                               fi
+                       done
+                       compopt -o nospace
+                       COMPREPLY=( $(compgen -P "$prefix" -W "$TYPE_COLS" -S ',' -- $realcur) )
                        return 0
                        ;;
                '-L'|'--label')
index f74efc9cc2520c6bbb3887034169583caacd7bda..f14327ce20b4cb1fdfaf52bf96dba55123f49891 100644 (file)
@@ -5,10 +5,6 @@ _mountpoint_module()
        cur="${COMP_WORDS[COMP_CWORD]}"
        prev="${COMP_WORDS[COMP_CWORD-1]}"
        case $prev in
-               '-f'|'--fixme')
-                       COMPREPLY=( $(compgen -W "fixme" -- $cur) )
-                       return 0
-                       ;;
                '-h'|'--help'|'-V'|'--version')
                        return 0
                        ;;
index 268f3782c5e0a7edaf37655feaa21788a65927df..ceea6100166aa03e05839c2dc4f4feef56622fd2 100644 (file)
@@ -5,6 +5,14 @@ _nsenter_module()
        cur="${COMP_WORDS[COMP_CWORD]}"
        prev="${COMP_WORDS[COMP_CWORD-1]}"
        case $prev in
+               '-S'|'--uid')
+                       COMPREPLY=( $(compgen -W "uid" -- $cur) )
+                       return 0
+                       ;;
+               '-G'|'--gid')
+                       COMPREPLY=( $(compgen -W "gid" -- $cur) )
+                       return 0
+                       ;;
                '-t'|'--target')
                        local PIDS
                        PIDS=$(for I in /proc/[0-9]*; do echo ${I##"/proc/"}; done)
@@ -24,18 +32,25 @@ _nsenter_module()
                        cur=${cur#=}
                        ;;
                -*)
-                       OPTS="--target
+                       OPTS="
+                               --all
+                               --target
                                --mount=
                                --uts=
                                --ipc=
                                --net=
                                --pid=
+                               --cgroup=
                                --user=
+                               --setuid
+                               --setgid
+                               --preserve-credentials
                                --root=
                                --wd=
                                --no-fork
                                --help
-                               --version"
+                               --version
+                       "
                        COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
                        return 0
                        ;;
index 23c774c1fd9a44e565ca74368e415e20d160d4b2..cdee2f3d35516e970ec4774cd03c2104416f12fc 100644 (file)
@@ -5,6 +5,12 @@ _rtcwake_module()
        cur="${COMP_WORDS[COMP_CWORD]}"
        prev="${COMP_WORDS[COMP_CWORD-1]}"
        case $prev in
+               '-A'|'--adjfile')
+                       local IFS=$'\n'
+                       compopt -o filenames
+                       COMPREPLY=( $(compgen -f -- $cur) )
+                       return 0
+                       ;;
                '-d'|'--device')
                        local RTC_DEVS
                        RTC_DEVS=$(cd /sys/class/rtc/ && echo *)
@@ -31,17 +37,22 @@ _rtcwake_module()
                        return 0
                        ;;
        esac
-       OPTS="  --date
+       OPTS="
+               --auto
+               --adjfile
+               --date
                --device
                --dry-run
                --local
+               --list-modes
                --mode
                --seconds
                --time
                --utc
                --verbose
                --help
-               --version"
+               --version
+       "
        COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
        return 0
 }
index 771de98d84f8e0d2df393d118ffc39a14edf4ce8..4496e97df8b3ffec444606fabab39ee19ba89528 100644 (file)
@@ -15,21 +15,24 @@ _setarch_module()
        fi
        case $cur in
                -*)
-                       OPTS="--verbose
-                               --addr-no-randomize
-                               --fdpic-funcptrs
-                               --mmap-page-zero
-                               --addr-compat-layout
-                               --read-implies-exec
+                       OPTS="
                                --32bit
+                               --fdpic-funcptrs
                                --short-inode
+                               --addr-compat-layout
+                               --addr-no-randomize
                                --whole-seconds
                                --sticky-timeouts
+                               --read-implies-exec
+                               --mmap-page-zero
                                --3gb
                                --4gb
                                --uname-2.6
+                               --verbose
+                               --list
                                --help
-                               --version"
+                               --version
+                       "
                        COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
                        return 0
                        ;;
index 568159bda20d7d9d68cdf12eb2f86a6b94f5455b..955ec27c0ee3de103c1022b61158f48e556c77e8 100644 (file)
@@ -11,7 +11,7 @@ _setsid_module()
        esac
        case $cur in
                -*)
-                       OPTS="--ctty --help --version"
+                       OPTS="--ctty --wait --help --version"
                        COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
                        return 0
                        ;;
index ecf78ec5e19f883e27ff1dc5a1f05c34302c1e57..d76cb9fffde4e6ed2854e4e61c4754b54b7c2723 100644 (file)
@@ -8,22 +8,9 @@ _umount_module()
                '-t'|'--types')
                        local TYPES
                        TYPES="
-adfs     noadfs        hfsplus   nohfsplus     smbfs     nosmbfs
-affs     noaffs        hpfs      nohpfs        squashfs  nosquashfs
-autofs   noautofs      iso9660   noiso9660     sysv      nosysv
-cifs     nocifs        jfs       nojfs         tmpfs     notmpfs
-coda     nocoda        minix     nominix       ubifs     noubifs
-coherent  nocoherent   msdos     nomsdos       udf       noudf
-cramfs   nocramfs      ncpfs     noncpfs       ufs       noufs
-debugfs          nodebugfs     nfs       nonfs         umsdos    noumsdos
-devpts   nodevpts      nfs4      nonfs4        usbfs     nousbfs
-efs      noefs         ntfs      nontfs        vfat      novfat
-                       proc      noproc        xenix     noxenix
-ext2     noext2        qnx4      noqnx4        xfs       noxfs
-ext3     noext3        ramfs     noramfs
-ext4     noext4        reiserfs  noreiserfs
-hfs      nohfs         romfs     noromfs
-"
+                               $(\ls /lib/modules/$(uname -r)/kernel/fs | awk '{print $1, "no" $1}')
+                               $(awk '{print $NF, "no" $NF}' /proc/filesystems)
+                       "
                        COMPREPLY=( $(compgen -W "$TYPES" -- $cur) )
                        return 0
                        ;;
index 86a4af4829b156cad434686ab59df9dc7e6c17d4..cd73c1d6cf806dfeeec9273173bbc7611dc7c147 100644 (file)
@@ -5,6 +5,14 @@ _unshare_module()
        cur="${COMP_WORDS[COMP_CWORD]}"
        prev="${COMP_WORDS[COMP_CWORD-1]}"
        case $prev in
+               '--propagation')
+                       COMPREPLY=( $(compgen -W "slave shared private unchanged" -- $cur) )
+                       return 0
+                       ;;
+               '-s'|'--setgroups')
+                       COMPREPLY=( $(compgen -W "allow deny" -- $cur) )
+                       return 0
+                       ;;
                '-h'|'--help'|'-V'|'--version')
                        return 0
                        ;;
@@ -17,6 +25,12 @@ _unshare_module()
                                --net
                                --pid
                                --user
+                               --cgroup
+                               --fork
+                               --mount-proc
+                               --map-root-user
+                               --propagation
+                               --setgroups
                                --help
                                --version"
                        COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
index a4ef536d87a4628488a92e10420f78dec89deb04..8c7767ce02e27983f3c1fb7fae2b824478044e3d 100644 (file)
@@ -13,7 +13,9 @@ _zramctl_module()
                        local prefix realcur OUTPUT_ALL OUTPUT
                        realcur="${cur##*,}"
                        prefix="${cur%$realcur}"
-                       OUTPUT_ALL="NAME DISKSIZE DATA COMPR ALGORITHM STREAMS ZERO-PAGES TOTAL MOUNTPOINT"
+                       OUTPUT_ALL="NAME DISKSIZE DATA COMPR ALGORITHM
+                               STREAMS ZERO-PAGES TOTAL MEM-LIMIT MEM-USED
+                               MIGRATED MOUNTPOINT"
                        for WORD in $OUTPUT_ALL; do
                                if ! [[ $prefix == *"$WORD"* ]]; then
                                        OUTPUT="$WORD $OUTPUT"