summaryrefslogtreecommitdiffstats
path: root/bash-completion
diff options
context:
space:
mode:
authorSami Kerola2017-04-11 12:02:25 +0200
committerSami Kerola2017-04-17 19:18:10 +0200
commitc6b1d511d21cc5b0c760935e57559d4ec3a44bf8 (patch)
tree4dde3a2cbcbd3284447cb8d3cbcfd93062bb23c4 /bash-completion
parentbash-completion: update login-utils (diff)
downloadkernel-qcow2-util-linux-c6b1d511d21cc5b0c760935e57559d4ec3a44bf8.tar.gz
kernel-qcow2-util-linux-c6b1d511d21cc5b0c760935e57559d4ec3a44bf8.tar.xz
kernel-qcow2-util-linux-c6b1d511d21cc5b0c760935e57559d4ec3a44bf8.zip
bash-completion: update misc-utils
fincore: Add RES column to --output completions. Commit: e4e8b57be2b63fed82647e4d5efd0e0eaf36b19e findfs: Commit: 940817b736bceccca9be6b9b73e4dd7da0d89142 logger: Add --socket-errors [1] and --tcp [2] options. Commit [1]: d77dc29e6e18d39b1845282e8039ac7117f3bd1c Commit [2]: 68265d070d3041d16ab074ba25c610d6ef6c842e lsblk: Add HOTPLUG [1], SERIAL [2], and SUBSYSTEMS [3] output fields. Add --json [4], --output-all [5], and --paths [6] options. Commit [1]: 483987c275e461f4118a89d3be013698845d702b Commit [2]: 460c7afb79075bd5b39e7d4bc153aa41c939bab3 Commit [3]: 7f14ee1b551e839a4ae081c8d2b7633ca40a5823 Commit [4]: 4a102a4871fdb415f4de5af9ffb7a2fb8926b5d1 Commit [5]: 1b4d2a4a4aa7df52033d293f26cd4fa79f95578d Commit [6]: c7e76cd145b0c40e1d346203f3222f5937146939 lslocks: Add --noinaccessible option. Remove file argument completion, this command does not use that sort of command line input. Commit: f29bc6e1cc4ed9f76bded543c6ab393f674ec3ed mcookie: Add --max-size option. Commit: f7bac5731bf559216aa2f0e8be1d7f477e7cf41a wipefs: Add --backup option. Commit: 7e658c15a2c1fc5092a790afbe7d9d395d04b098 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'bash-completion')
-rw-r--r--bash-completion/Makemodule.am3
-rw-r--r--bash-completion/fincore2
-rw-r--r--bash-completion/findfs34
-rw-r--r--bash-completion/logger6
-rw-r--r--bash-completion/lsblk20
-rw-r--r--bash-completion/lslocks30
-rw-r--r--bash-completion/mcookie6
-rw-r--r--bash-completion/wipefs13
8 files changed, 85 insertions, 29 deletions
diff --git a/bash-completion/Makemodule.am b/bash-completion/Makemodule.am
index 6885ae91c..d94b995dc 100644
--- a/bash-completion/Makemodule.am
+++ b/bash-completion/Makemodule.am
@@ -21,6 +21,9 @@ endif
if BUILD_FINCORE
dist_bashcompletion_DATA += bash-completion/fincore
endif
+if BUILD_FINDFS
+dist_bashcompletion_DATA += bash-completion/findfs
+endif
if BUILD_FINDMNT
dist_bashcompletion_DATA += bash-completion/findmnt
endif
diff --git a/bash-completion/fincore b/bash-completion/fincore
index 9b1aed8f3..4988f198b 100644
--- a/bash-completion/fincore
+++ b/bash-completion/fincore
@@ -9,7 +9,7 @@ _fincore_module()
local prefix realcur OUTPUT_ALL OUTPUT
realcur="${cur##*,}"
prefix="${cur%$realcur}"
- OUTPUT_ALL='PAGES SIZE FILE'
+ OUTPUT_ALL='PAGES SIZE FILE RES'
for WORD in $OUTPUT_ALL; do
if ! [[ $prefix == *"$WORD"* ]]; then
OUTPUT="$WORD $OUTPUT"
diff --git a/bash-completion/findfs b/bash-completion/findfs
new file mode 100644
index 000000000..5297b863f
--- /dev/null
+++ b/bash-completion/findfs
@@ -0,0 +1,34 @@
+_findfs_module()
+{
+ local cur prev OPTS findable
+ 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="--version --help"
+ COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
+ return 0
+ ;;
+ esac
+ for i in $(lsblk -rpno label); do
+ findable+=" LABEL=$i"
+ done
+ for i in $(lsblk -rpno uuid); do
+ findable+=" UUID=$i"
+ done
+ for i in $(lsblk -rpno partlabel); do
+ findable+=" PARTLABEL=$i"
+ done
+ for i in $(lsblk -rpno partuuid); do
+ findable+=" PARTUUID=$i"
+ done
+ COMPREPLY=( $(compgen -W "$findable" -- $cur) )
+ return 0
+}
+complete -F _findfs_module findfs
diff --git a/bash-completion/logger b/bash-completion/logger
index 7f7f086ca..7fb95652f 100644
--- a/bash-completion/logger
+++ b/bash-completion/logger
@@ -31,6 +31,10 @@ _logger_module()
COMPREPLY=( $(compgen -W "$(awk '$NF ~ /^\// {print $NF}' /proc/net/unix)" -- $cur) )
return 0
;;
+ '--socket-errors')
+ COMPREPLY=( $(compgen -W "on off auto" -- $cur) )
+ return 0
+ ;;
'--msgid')
COMPREPLY=( $(compgen -W "msgid" -- $cur) )
return 0
@@ -58,8 +62,10 @@ _logger_module()
--size
--skip-empty
--socket
+ --socket-errors
--stderr
--tag
+ --tcp
--udp
--version
"
diff --git a/bash-completion/lsblk b/bash-completion/lsblk
index e32f37100..4fef8fc84 100644
--- a/bash-completion/lsblk
+++ b/bash-completion/lsblk
@@ -1,18 +1,17 @@
_lsblk_module()
{
- local cur prev OPTS
+ local cur prev OPTS LSBLK_COLS_ALL
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
- LSBLK_COLS_ALL="NAME KNAME MAJ:MIN FSTYPE MOUNTPOINT
- LABEL UUID PARTTYPE PARTLABEL PARTUUID PARTFLAGS
- RA RO RM
- MODEL SIZE STATE OWNER GROUP MODE
- ALIGNMENT MIN-IO OPT-IO PHY-SEC LOG-SEC
- ROTA SCHED RQ-SIZE TYPE DISC-ALN
- DISC-GRAN DISC-MAX DISC-ZERO WSAME WWN
- RAND PKNAME HCTL TRAN REV VENDOR"
+ LSBLK_COLS_ALL="
+ NAME KNAME MAJ:MIN FSTYPE MOUNTPOINT LABEL UUID PARTTYPE
+ PARTLABEL PARTUUID PARTFLAGS RA RO RM HOTPLUG MODEL SERIAL SIZE
+ STATE OWNER GROUP MODE ALIGNMENT MIN-IO OPT-IO PHY-SEC LOG-SEC
+ ROTA SCHED RQ-SIZE TYPE DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO
+ WSAME WWN RAND PKNAME HCTL TRAN SUBSYSTEMS REV VENDOR
+ "
case $prev in
'-e'|'--exclude'|'-I'|'--include')
@@ -64,11 +63,14 @@ _lsblk_module()
--fs
--help
--include
+ --json
--ascii
--list
--perms
--noheadings
--output
+ --output-all
+ --paths
--pairs
--raw
--inverse
diff --git a/bash-completion/lslocks b/bash-completion/lslocks
index 0fd0acd00..4ca1e6b6e 100644
--- a/bash-completion/lslocks
+++ b/bash-completion/lslocks
@@ -31,23 +31,19 @@ _lslocks_module()
return 0
;;
esac
- case $cur in
- -*)
- OPTS="--pid
- --json
- --output
- --noheadings
- --raw
- --notruncate
- --help
- --version"
- COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
- return 0
- ;;
- esac
- local IFS=$'\n'
- compopt -o filenames
- COMPREPLY=( $(compgen -f -- $cur) )
+ OPTS="
+ --json
+ --noinaccessible
+ --noheadings
+ --output
+ --pid
+ --raw
+ --notruncate
+ --help
+ --version
+ "
+ COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
return 0
+
}
complete -F _lslocks_module lslocks
diff --git a/bash-completion/mcookie b/bash-completion/mcookie
index 4345b6e6c..041582ffc 100644
--- a/bash-completion/mcookie
+++ b/bash-completion/mcookie
@@ -11,13 +11,17 @@ _mcookie_module()
COMPREPLY=( $(compgen -f -- $cur) )
return 0
;;
+ '-m'|'--max-size')
+ COMPREPLY=( $(compgen -W "bytes" -- $cur) )
+ return 0
+ ;;
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)
- OPTS="--file --verbose --version --help"
+ OPTS="--file --max-size --verbose --version --help"
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
return 0
;;
diff --git a/bash-completion/wipefs b/bash-completion/wipefs
index d735b5ac7..577819182 100644
--- a/bash-completion/wipefs
+++ b/bash-completion/wipefs
@@ -21,7 +21,18 @@ _wipefs_module()
esac
case $cur in
-*)
- OPTS="--all --force --help --no-act --offset --parsable --quiet --types --version"
+ OPTS="
+ --all
+ --backup
+ --force
+ --help
+ --no-act
+ --offset
+ --parsable
+ --quiet
+ --types
+ --version
+ "
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
return 0
;;