mirror of
https://github.com/ipfs/kubo.git
synced 2025-10-25 18:36:26 +08:00
docs: Check if GOPATH exists before sourcing command-completion
This commit is contained in:
@ -13,8 +13,12 @@ Linux
|
|||||||
-----
|
-----
|
||||||
### Bash
|
### Bash
|
||||||
|
|
||||||
For bash, completion can be enabled in a couple of ways. One is to add the line
|
For bash, completion can be enabled in a couple of ways. One is to add
|
||||||
`source $GOPATH/src/github.com/ipfs/go-ipfs/misc/completion/ipfs-completion.bash`
|
```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
|
into your `~/.bash_completion`. It will automatically be loaded the next time
|
||||||
bash is loaded.
|
bash is loaded.
|
||||||
To enable ipfs command completion globally on your system you may also
|
To enable ipfs command completion globally on your system you may also
|
||||||
|
|||||||
Reference in New Issue
Block a user