File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -17,15 +17,17 @@ adding the following snippet:
17
17
18
18
### Zsh
19
19
20
+ Load up the completion by placing the ` exercism_completion.zsh ` somewhere on
21
+ your ` $fpath ` as ` _exercism ` . For example:
22
+
20
23
mkdir -p ~/.config/exercism
21
- mv ../shell/exercism_completion.zsh ~/.config/exercism/exercism_completion.zsh
24
+ mv ../shell/exercism_completion.zsh ~/.config/exercism/_exercism
22
25
23
- Load up the completion in your ` .zshrc ` , ` .zsh_profile ` or ` .profile ` by adding
24
- the following snippet
26
+ and then add the directory to your ` $fpath ` in your ` .zshrc ` , ` .zsh_profile ` or
27
+ ` .profile ` before running ` compinit ` :
25
28
26
- if [ -f ~/.config/exercism/exercism_completion.zsh ]; then
27
- source ~/.config/exercism/exercism_completion.zsh
28
- fi
29
+ export fpath=(~/.config/exercism $fpath)
30
+ autoload -U compinit && compinit
29
31
30
32
31
33
#### Oh my Zsh
Original file line number Diff line number Diff line change
1
+ # compdef exercism
2
+
1
3
_exercism () {
2
4
local curcontext=" $curcontext " state line
3
5
typeset -A opt_args
@@ -33,4 +35,4 @@ _exercism() {
33
35
esac
34
36
}
35
37
36
- compdef ' _exercism' exercism
38
+ _exercism " $@ "
You can’t perform that action at this time.
0 commit comments