summaryrefslogtreecommitdiff
path: root/completions/fio
diff options
context:
space:
mode:
Diffstat (limited to 'completions/fio')
-rw-r--r--completions/fio31
1 files changed, 16 insertions, 15 deletions
diff --git a/completions/fio b/completions/fio
index 7710cf6b..f81a4da7 100644
--- a/completions/fio
+++ b/completions/fio
@@ -6,28 +6,29 @@ _fio()
_init_completion -s || return
case $prev in
- --help|--version)
+ --help | --version)
return
;;
--debug)
- local prefix=; [[ $cur == *,* ]] && prefix="${cur%,*},"
- COMPREPLY=( $(compgen -W "process file io mem blktrace verify
+ local prefix=
+ [[ $cur == *,* ]] && prefix="${cur%,*},"
+ COMPREPLY=($(compgen -W "process file io mem blktrace verify
random parse diskutil job mutex profile time net rate compress
- steadystate helperthread" -- "${cur##*,}") )
- [[ ${#COMPREPLY[@]} -eq 1 ]] && COMPREPLY=( ${COMPREPLY/#/$prefix} )
+ steadystate helperthread" -- "${cur##*,}"))
+ ((${#COMPREPLY[@]} == 1)) && COMPREPLY=(${COMPREPLY/#/$prefix})
return
;;
--output-format)
- COMPREPLY=( $(compgen -W "terse json json+ normal" -- "$cur") )
+ COMPREPLY=($(compgen -W "terse json json+ normal" -- "$cur"))
return
;;
--terse-version)
- COMPREPLY=( $(compgen -W "2 3" -- "$cur") )
+ COMPREPLY=($(compgen -W "2 3" -- "$cur"))
return
;;
--cmdhelp)
# TODO more commands?
- COMPREPLY=( $(compgen -W "all" -- "$cur") )
+ COMPREPLY=($(compgen -W "all" -- "$cur"))
return
;;
--enghelp)
@@ -36,7 +37,7 @@ _fio()
return
;;
--eta)
- COMPREPLY=( $(compgen -W "always never auto" -- "$cur") )
+ COMPREPLY=($(compgen -W "always never auto" -- "$cur"))
return
;;
--daemonize)
@@ -52,7 +53,7 @@ _fio()
return
;;
--idle-prof)
- COMPREPLY=( $(compgen -W "system percpu calibrate" -- "$cur") )
+ COMPREPLY=($(compgen -W "system percpu calibrate" -- "$cur"))
return
;;
--inflate-log)
@@ -63,9 +64,9 @@ _fio()
_filedir
return
;;
- --trigger|--trigger-remote)
+ --trigger | --trigger-remote)
compopt -o filenames
- COMPREPLY=( $(compgen -c -- "$cur") )
+ COMPREPLY=($(compgen -c -- "$cur"))
return
;;
--aux-path)
@@ -77,13 +78,13 @@ _fio()
$split && return
if [[ $cur == -* ]]; then
- COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") )
- [[ $COMPREPLY == *= ]] && compopt -o nospace
+ COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ [[ ${COMPREPLY-} == *= ]] && compopt -o nospace
return
fi
_filedir job
} &&
-complete -F _fio fio
+ complete -F _fio fio
# ex: filetype=sh