@@ -4,25 +4,24 @@ _exercism () {
4
4
COMPREPLY=() # Array variable storing the possible completions.
5
5
cur=${COMP_WORDS[COMP_CWORD]}
6
6
prev=${COMP_WORDS[COMP_CWORD-1]}
7
+ opts=" --verbose --timeout"
7
8
8
- commands=" configure debug download fetch list open
9
- restore skip status submit tracks unsubmit
10
- upgrade help"
11
- tracks=" csharp cpp clojure coffeescript lisp crystal
12
- dlang ecmascript elixir elm elisp erlang
13
- fsharp go haskell java javascript kotlin
14
- lfe lua mips ocaml objective-c php
15
- plsql perl5 python racket ruby rust scala
16
- scheme swift typescript bash c ceylon
17
- coldfusion delphi factor groovy haxe
18
- idris julia nim perl6 pony prolog
19
- purescript r sml vbnet powershell"
20
- config_opts=" --dir --host --key --api"
21
- submit_opts=" --test --comment"
9
+ commands=" configure download open
10
+ submit troubleshoot upgrade version workspace help"
11
+ config_opts=" --show"
12
+ version_opts=" --latest"
22
13
23
14
if [ " ${# COMP_WORDS[@]} " -eq 2 ]; then
24
- COMPREPLY=( $( compgen -W " ${commands} " " ${cur} " ) )
25
- return 0
15
+ case " ${cur} " in
16
+ -* )
17
+ COMPREPLY=( $( compgen -W " ${opts} " -- " ${cur} " ) )
18
+ return 0
19
+ ;;
20
+ * )
21
+ COMPREPLY=( $( compgen -W " ${commands} " " ${cur} " ) )
22
+ return 0
23
+ ;;
24
+ esac
26
25
fi
27
26
28
27
if [ " ${# COMP_WORDS[@]} " -eq 3 ]; then
@@ -31,28 +30,8 @@ _exercism () {
31
30
COMPREPLY=( $( compgen -W " ${config_opts} " -- " ${cur} " ) )
32
31
return 0
33
32
;;
34
- fetch)
35
- COMPREPLY=( $( compgen -W " ${tracks} " " ${cur} " ) )
36
- return 0
37
- ;;
38
- list)
39
- COMPREPLY=( $( compgen -W " ${tracks} " " ${cur} " ) )
40
- return 0
41
- ;;
42
- open)
43
- COMPREPLY=( $( compgen -W " ${tracks} " " ${cur} " ) )
44
- return 0
45
- ;;
46
- skip)
47
- COMPREPLY=( $( compgen -W " ${tracks} " " ${cur} " ) )
48
- return 0
49
- ;;
50
- status)
51
- COMPREPLY=( $( compgen -W " ${tracks} " " ${cur} " ) )
52
- return 0
53
- ;;
54
- submit)
55
- COMPREPLY=( $( compgen -W " ${submit_opts} " -- " ${cur} " ) )
33
+ version)
34
+ COMPREPLY=( $( compgen -W " ${version_opts} " -- " ${cur} " ) )
56
35
return 0
57
36
;;
58
37
help)
0 commit comments