We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e98310f commit 517f301Copy full SHA for 517f301
shell/exercism_completion.bash
@@ -4,15 +4,24 @@ _exercism () {
4
COMPREPLY=() # Array variable storing the possible completions.
5
cur=${COMP_WORDS[COMP_CWORD]}
6
prev=${COMP_WORDS[COMP_CWORD-1]}
7
+ opts="--verbose --timeout"
8
9
commands="configure download open
10
submit troubleshoot upgrade version workspace help"
11
config_opts="--show"
12
version_opts="--latest"
13
14
if [ "${#COMP_WORDS[@]}" -eq 2 ]; then
- COMPREPLY=( $( compgen -W "${commands}" "${cur}" ) )
15
- return 0
+ case "${cur}" in
16
+ -*)
17
+ COMPREPLY=( $( compgen -W "${opts}" -- "${cur}" ) )
18
+ return 0
19
+ ;;
20
+ *)
21
+ COMPREPLY=( $( compgen -W "${commands}" "${cur}" ) )
22
23
24
+ esac
25
fi
26
27
if [ "${#COMP_WORDS[@]}" -eq 3 ]; then
0 commit comments