diff options
Diffstat (limited to 'completions/minicom')
-rw-r--r-- | completions/minicom | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/completions/minicom b/completions/minicom index 2e98229a..57510e98 100644 --- a/completions/minicom +++ b/completions/minicom @@ -6,35 +6,35 @@ _minicom() _init_completion -s || return case $prev in - --attrib|--color|-!(-*)[ac]) - COMPREPLY=( $(compgen -W 'on off' -- "$cur") ) + --attrib | --color | -!(-*)[ac]) + COMPREPLY=($(compgen -W 'on off' -- "$cur")) return ;; - --script|--capturefile|-!(-*)[SC]) + --script | --capturefile | -!(-*)[SC]) _filedir return ;; - --ptty|-!(-*)p) - COMPREPLY=( $(printf '%s\n' /dev/tty*) ) - COMPREPLY=( $(compgen -W '${COMPREPLY[@]} ${COMPREPLY[@]#/dev/}' \ - -- "$cur") ) + --ptty | -!(-*)p) + COMPREPLY=($(printf '%s\n' /dev/tty*)) + COMPREPLY=($(compgen -W '${COMPREPLY[@]} ${COMPREPLY[@]#/dev/}' \ + -- "$cur")) return ;; esac $split && return - if [[ "$cur" == -* ]]; then - COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") ) - [[ $COMPREPLY == *= ]] && compopt -o nospace + if [[ $cur == -* ]]; then + COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi COMPREPLY=( - $(printf '%s\n' /etc/minirc.* /etc/minicom/minirc.* ~/.minirc.* \ - | command sed -e '/\*$/d' -e 's/^.*minirc\.//' \ - | command grep "^${cur}") ) + $(printf '%s\n' /etc/minirc.* /etc/minicom/minirc.* ~/.minirc.* | + command sed -e '/\*$/d' -e 's/^.*minirc\.//' | + command grep "^${cur}")) } && -complete -F _minicom -o default minicom + complete -F _minicom -o default minicom # ex: filetype=sh |