diff options
author | Gabriel F. T. Gomes <gabriel@inconstante.net.br> | 2020-08-03 18:43:13 -0300 |
---|---|---|
committer | Gabriel F. T. Gomes <gabriel@inconstante.net.br> | 2020-08-03 18:43:13 -0300 |
commit | 95623d39d6029ba78ec96ad5ea08e9ac12629b91 (patch) | |
tree | ea0fe36eb5e6f40e0a1f765d44c4b0c0b2bfb089 /completions/fio | |
parent | 019f3cc463db63abc6460f97deb488deec43840b (diff) | |
download | bash-completion-95623d39d6029ba78ec96ad5ea08e9ac12629b91.tar.gz |
New upstream version 2.11upstream/2.11upstream
Diffstat (limited to 'completions/fio')
-rw-r--r-- | completions/fio | 31 |
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 |