test/tests/include.key_value_list_exec.zsh
raw| 1 | _complete_key_value_list() { |
| 2 | if (( $# == 0 )); then |
| 3 | printf '%s\t%s\t%s\n' \ |
| 4 | 'async' 'set async mode' '' \ |
| 5 | 'animal=' 'select an animal' '' \ |
| 6 | 'optional=?' 'optional argument' '' \ |
| 7 | 'special' "special chars: []'\"\$\`\\" '' \ |
| 8 | 'exclusive' 'disable options' 'async animal' \ |
| 9 | '*repeatable' 'repeatable option' '' |
| 10 | else |
| 11 | case "$1" in |
| 12 | animal|optional) |
| 13 | printf '%s\t%s\n' \ |
| 14 | 'cat' 'a cat' \ |
| 15 | 'dog' 'a dog' \ |
| 16 | 'horse' 'a horse' \ |
| 17 | 'special' ":[]'\"\$\`\\";; |
| 18 | esac |
| 19 | fi |
| 20 | } |