command-completion.md 788 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Command Completion
==================

Shell command completion is provided by the script at 
`/misc/completion/ipfs-completion.bash`.

The simplest way to see it working is to run 
`source misc/completion/ipfs-completion.bash` straight from your shell. This
is only temporary and to fully enable it, you'll have to follow one of the steps
below.

Linux
-----
### Bash

16 17 18 19 20 21
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
```
22 23 24 25
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 
copy the completion script to `/etc/bash_completion.d/`.