1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
#!/bin/bash completion for st-send-replication-progress
_st-send-replication-progress() {
local cur prev cmd_name
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
cmd_name="${COMP_WORDS[1]}"
case "${cmd_name}" in
"-s|--server")
COMPREPLY=( $(compgen -W "-p --port -c --cluster" -- ${cur}) )
return 0
;;
"-p|--port")
COMPREPLY=( $(compgen -W "-s --server -c --cluster" -- ${cur}) )
return 0
;;
"-c|--cluster")
COMPREPLY=( $(compgen -W "-s --server -p --port" -- ${cur}) )
return 0
;;
esac
COMPREPLY=($(compgen -W "-s --server -p --port -c --cluster" -- "${cur}"))
return 0
}
complete -F _st-send-replication-progress st-send-replication-progress
|