test/tests/include.key_value_pair_exec.fish
raw| 1 | function _complete_key_value_pair |
| 2 | if test (count $argv) -eq 0 |
| 3 | printf '%s\t%s\n' \ |
| 4 | 'async' 'set async mode' \ |
| 5 | 'animal=' 'select an animal' \ |
| 6 | 'special' "special chars: []'\"\$`\\" |
| 7 | else |
| 8 | switch "$argv[1]" |
| 9 | case animal |
| 10 | printf '%s\t%s\n' \ |
| 11 | 'cat' 'a cat' \ |
| 12 | 'dog' 'a dog' \ |
| 13 | 'horse' 'a horse' \ |
| 14 | 'special' ":[]'\"\$`\\" |
| 15 | end |
| 16 | end |
| 17 | end |