blob: 2dbdbb5d294578a4b5a2af6679c558a8cf2edc00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
Completion
========================
### bash completion
1. install bash-completion as follows:
```
% sudo apt-get install bash-completion
```
1. add gobgp's path to PATH environment variable
If you run 'go get github.com/osrg/gobgp/gobgp', gobgp command is installed in $GOPATH/bin.
```
% export PATH=$PATH:$GOPATH/bin
```
1. load completion file
```
% source $GOPATH/src/github.com/osrg/gobgp/tools/completion/gobgp-completion.bash
```
You can use tab completion for gobgp after loading gobgp-completion.bash.
### zsh completion
zsh completion for gobgp works by adding the path of gobgp zsh completion directory to $fpath and enabling zsh completion like below:
```
% vi ~/.zshrc
GOBGP_COMP=$GOPATH/src/github.com/osrg/gobgp/tools/completion/zsh
fpath=($GOBGP_COMP $fpath)
autoload -Uz compinit
compinit
```
|