summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEyal Posener <[email protected]>2020-04-04 12:44:12 +0300
committerEyal Posener <[email protected]>2020-04-04 12:44:12 +0300
commit1b58b8b755320649a51707ac927fe46164fc3896 (patch)
treedc87fa08ea91d082b7bef6f03755f57260462508
parentbdd345f07984e50450366cf726def3aa6d9c0b94 (diff)
Add installation instructions
Related to #120
-rw-r--r--doc.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc.go b/doc.go
index 63775dc..51ce8ba 100644
--- a/doc.go
+++ b/doc.go
@@ -48,6 +48,12 @@ Supported shells:
- [x] zsh
- [x] fish
+The installation of completion for a command line tool is done automatically by this library by
+running the command line tool with the `COMP_INSTALL` environment variable set. Uninstalling the
+completion is similarly done by the `COMP_UNINSTALL` environment variable.
+For example, if a tool called `my-cli` uses this library, the completion can install by running
+`COMP_INSTALL=1 my-cli`.
+
Usage
Add bash completion capabilities to any Go program. See ./example/command.