diff options
Diffstat (limited to 'completions/minicom')
-rw-r--r-- | completions/minicom | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/completions/minicom b/completions/minicom index 897475ed..2e98229a 100644 --- a/completions/minicom +++ b/completions/minicom @@ -2,37 +2,38 @@ _minicom() { - local cur prev words cword - _init_completion || return + local cur prev words cword split + _init_completion -s || return case $prev in - -a|-c) - COMPREPLY=( $( compgen -W 'on off' -- "$cur" ) ) + --attrib|--color|-!(-*)[ac]) + COMPREPLY=( $(compgen -W 'on off' -- "$cur") ) return ;; - -S|-C) + --script|--capturefile|-!(-*)[SC]) _filedir return ;; - -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 '-s -o -m -M -z -l -L -w -a -t -c -S -d -p -C - -T -7 -8' -- "$cur" ) ) + COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") ) + [[ $COMPREPLY == *= ]] && compopt -o nospace return fi COMPREPLY=( - $( printf '%s\n' /etc/minirc.* /etc/minicom/minirc.* ~/.minirc.* \ + $(printf '%s\n' /etc/minirc.* /etc/minicom/minirc.* ~/.minirc.* \ | command sed -e '/\*$/d' -e 's/^.*minirc\.//' \ - | command grep "^${cur}" ) ) + | command grep "^${cur}") ) } && complete -F _minicom -o default minicom |