提交 d6d038bf 作者: Dylan Powers

docs: Check if GOPATH exists before sourcing command-completion

上级 71e89191
......@@ -13,8 +13,12 @@ Linux
-----
### Bash
For bash, completion can be enabled in a couple of ways. One is to add the line
`source $GOPATH/src/github.com/ipfs/go-ipfs/misc/completion/ipfs-completion.bash`
For bash, completion can be enabled in a couple of ways. One is to add
```bash
if [ -n "$GOPATH" ]; then
source $GOPATH/src/github.com/ipfs/go-ipfs/misc/completion/ipfs-completion.bash
fi
```
into your `~/.bash_completion`. It will automatically be loaded the next time
bash is loaded.
To enable ipfs command completion globally on your system you may also
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论