diff options
| author | Eyal Posener <[email protected]> | 2017-05-06 18:55:54 +0300 |
|---|---|---|
| committer | Eyal Posener <[email protected]> | 2017-05-06 18:55:54 +0300 |
| commit | 4f47fe9246e715f11272d6323343a12797d4d13f (patch) | |
| tree | 65eb8cd82bbb5da33c548b5510f91f8017b04330 /readme.md | |
| parent | d33bac720bcaf13a5ee9f6f165293183d2e3e24d (diff) | |
Add easy way to install the bash completion
Diffstat (limited to 'readme.md')
| -rw-r--r-- | readme.md | 21 |
1 files changed, 13 insertions, 8 deletions
@@ -5,20 +5,25 @@ WIP -a tool for bash writing bash completion in go. +A tool for bash writing bash completion in go. -## example: `go` command bash completion +Writing bash completion scripts is a hard work. This package provides an easy way +to create bash completion scripts for any command, and also an easy way to install/uninstall +the completion of the command. -Install in you home directory: +## go command bash completion + +In [gocomplete](./gocomplete) there is an example for bash completion for the `go` command line. + +### Install ``` -go build -o ~/.bash_completion/go ./gocomplete -echo "complete -C ~/.bash_completion/go go" >> ~/.bashrc +go get github.com/posener/complete/gocomplete +gocomplete -install ``` -Or, install in the root directory: +### Uninstall ``` -sudo go build -o /etc/bash_completion.d/go ./gocomplete +gocomplete -uninstall ``` - |
