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-st-compare-ring() {
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
"-n|--nb_test")
COMPREPLY=( $(compgen -W "-j --json -p --pattern" -- ${cur}) )
return 0
;;
"-j|--json")
COMPREPLY=( $(compgen -W "-n --nb_test -p --pattern" -- ${cur}) )
return 0
;;
"-p|--pattern")
COMPREPLY=( $(compgen -W "-n --nb_test -j --json" -- ${cur}) )
return 0
;;
esac
COMPREPLY=($(compgen -W "-n --nb_test -j --json -p --pattern" -- "${cur}"))
return 0
}
complete -F _st-compare-ring st-compare-ring
|