summaryrefslogtreecommitdiffstats
path: root/bash-completion/wipefs
diff options
context:
space:
mode:
authorSami Kerola2017-09-17 20:49:02 +0200
committerKarel Zak2017-09-18 11:04:52 +0200
commit37a6cc7a143e4b7a9f48927f1709667a37d349d1 (patch)
tree714e2de6d2582716506ab9f66f0be2f02d39f872 /bash-completion/wipefs
parentdocs: remove repeated word from mount(8) man page (diff)
downloadkernel-qcow2-util-linux-37a6cc7a143e4b7a9f48927f1709667a37d349d1.tar.gz
kernel-qcow2-util-linux-37a6cc7a143e4b7a9f48927f1709667a37d349d1.tar.xz
kernel-qcow2-util-linux-37a6cc7a143e4b7a9f48927f1709667a37d349d1.zip
bash-completion: update uuidgen, wipefs, tunelp, setpriv, and hwclock
uuidgen: Add hash-based UUIDs to bash-completion. These were added in commit c6f1ec68a8b38863efff2a18e30b7272db4fb273. wipefs: Command started to use libsmartcols, and it got some new options. Commit d9921b2a128f17aa9a9a110444d5faa43e1b371c. rename: New option was added in commit fabb90676af89bcb5f429793746f141c0. tunelp: The --trust-irq was removed it being years broken. Commit d52eb4bd9062081c8420b22c029c694f29d036c7. setpriv: Add --ambient-caps option from commit 0c92194eeee9c1fd58580ef852. In same go fix 'bash set -u' issue, that is the same as mentioned commit abbcec4fc9c8d7fb835b4eafd1bc9d82acbf0056. hwclock: For some reason --get has always been missing from this file. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'bash-completion/wipefs')
-rw-r--r--bash-completion/wipefs19
1 files changed, 18 insertions, 1 deletions
diff --git a/bash-completion/wipefs b/bash-completion/wipefs
index 577819182..13568ca32 100644
--- a/bash-completion/wipefs
+++ b/bash-completion/wipefs
@@ -5,6 +5,20 @@ _wipefs_module()
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="UUID LABEL LENGTH TYPE OFFSET USAGE DEVICE"
+ 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
+ ;;
'-o'|'--offset')
COMPREPLY=( $(compgen -W "offset" -- $cur) )
return 0
@@ -25,12 +39,15 @@ _wipefs_module()
--all
--backup
--force
- --help
+ --noheadings
+ --json
--no-act
--offset
+ --output
--parsable
--quiet
--types
+ --help
--version
"
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )