summaryrefslogtreecommitdiff
path: root/cmd/install
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/install')
-rw-r--r--cmd/install/install.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/install/install.go b/cmd/install/install.go
index cef11f0..8f8ce9f 100644
--- a/cmd/install/install.go
+++ b/cmd/install/install.go
@@ -10,6 +10,10 @@ type installer interface {
Uninstall(cmd, bin string) error
}
+// Install complete command given:
+// cmd: is the command name
+// asRoot: if true the completion will be installed in /etc/bash_complete.d
+// otherwise the complete command will be added to the ~/.bashrc file.
func Install(cmd string, asRoot bool) error {
bin, err := getBinaryPath()
if err != nil {
@@ -18,6 +22,10 @@ func Install(cmd string, asRoot bool) error {
return getInstaller(asRoot).Install(cmd, bin)
}
+// Uninstall complete command given:
+// cmd: is the command name
+// asRoot: if true the completion will be removed from /etc/bash_complete.d
+// otherwise the complete command will be removed from the ~/.bashrc file.
func Uninstall(cmd string, asRoot bool) error {
bin, err := getBinaryPath()
if err != nil {