| 1 |
prog: crazy-complete-test |
| 2 |
options: |
| 3 |
- option_strings: ['-f'] |
| 4 |
|
| 5 |
- option_strings: ['--option', '-option', '-O'] |
| 6 |
complete: ['key_value_list', ',', '=', [ |
| 7 |
['flag', null, null], |
| 8 |
['mode', null, ['choices', ['strict', 'relaxed']]] |
| 9 |
]] |
| 10 |
|
| 11 |
# Test argument extraction for Fish shell completions. |
| 12 |
# |
| 13 |
# Some completers need access to the argument currently being completed and |
| 14 |
# therefore call `commandline -ct`. This command outputs the entire |
| 15 |
# command-line token rather than just the option's argument (for example |
| 16 |
# `-ovalue`, `--option=value`, or `-option=value`). |
| 17 |
# |
| 18 |
# Crazy-complete provides `get_completing_arg` to extract the actual argument |
| 19 |
# of the option before passing it to the completer. These tests verify that |
| 20 |
# `get_completing_arg` behaves correctly for the different option syntaxes. |