summaryrefslogtreecommitdiffstats
path: root/bash-completion/wipefs
diff options
context:
space:
mode:
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) )