command-completion.md 983 Bytes
Newer Older
1 2 3 4
Command Completion
==================

Shell command completion is provided by the script at 
5
[/misc/completion/ipfs-completion.bash](../misc/completion/ipfs-completion.bash).
6

7 8 9

Installation
------------
10 11 12 13 14
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.

15
### Bash on Linux
16 17 18
For bash, completion can be enabled in a couple of ways. One is to copy the 
completion script to the directory `~/.ipfs/` and then in the file 
`~/.bash_completion` add
19
```bash
20
source ~/.ipfs/ipfs-completion.bash
21
```
22
It will automatically be loaded the next time bash is loaded.
23 24
To enable ipfs command completion globally on your system you may also 
copy the completion script to `/etc/bash_completion.d/`.
25 26 27 28 29


Additional References
---------------------
* https://www.debian-administration.org/article/316/An_introduction_to_bash_completion_part_1