/bash_completion_lib/complete/postfix
http://github.com/brinkman83/bashrc · #! · 28 lines · 24 code · 4 blank · 0 comment · 0 complexity · f0e4d1c7c120091957b19bb8cb13a91c MD5 · raw file
- # Postfix completion.
- #
- comp_include _filedir _get_cword
- _postfix()
- {
- local cur prev
- cur=`_get_cword`
- prev=${COMP_WORDS[COMP_CWORD-1]}
- if [[ $cur == '-' ]]; then
- COMPREPLY=(-c -D -v)
- return 0
- fi
- if [[ $prev == '-c' ]]; then
- _filedir -d
- return 0
- fi
- if [[ $prev == '-D' ]]; then
- COMPREPLY=( $( compgen -W 'start' -- "${COMP_WORDS[COMP_CWORD]}" ) )
- return 0
- fi
- COMPREPLY=( $( compgen -W 'start stop reload abort flush check' -- \
- "${COMP_WORDS[COMP_CWORD]}" ) )
- }
- _postfix