Commit Graph

23 Commits

Author SHA1 Message Date
Anis Elleuch 010e7ab389 Export IsInstalled() in install package 2019-07-02 14:59:19 +01:00
Anis Elleuch c6bcb58fc4 Add IsInstalled API to installer interface
`IsInstalled(cmd, bin string) bool` will help tools using this library
to show a prompt to users asking if they would like to have completion
enabled.
2019-06-28 13:45:36 +01:00
Anis Elleuch afda8e00c6 Install in ~/.bash_profile first in case of macOS
Some macOS users have ~/.bashrc which is not loaded from
~/.bash_profile, which means, completion will never be
loaded when users open a terminal.

This commit will make macOS a special case and will always
tend to install in ~/.bas_profile
2019-05-29 01:16:22 +01:00
George Christou 1fa456f134
Fix fish shell completion 2019-02-07 21:19:20 +00:00
Eyal Posener 6db5f134c9 fix lint issues 2018-09-10 10:50:47 +03:00
Adam S Levy 8200804f12 refactor(log,cmd/install/fish): Small refactors to pass gometalinter.v2 2018-08-29 09:47:45 -08:00
Adam S Levy 752e8dc2ac
Clarify description of "-y" option
Clarify the description of the "-y" option so that it is obvious that the option refers only to installing completion.
2018-08-22 16:40:56 -08:00
Eyal Posener d22b38ff2e install: create file directory before file is created
Fixes #59
2018-03-09 08:18:31 +02:00
Yuki Ito fbb0b60454 Add support for fish 2018-01-08 17:51:45 +09:00
Costas Tyfoxylos 3682ca65e0 Fixes the issue where if .profile is used and not any of the other files the -install-autocomplete fails with :
Error executing CLI: Did not find any shells to install

excerpt from bash man page

    When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior.

    When an interactive shell that is not a login shell is started, bash reads and executes commands from /etc/bash.bashrc and ~/.bashrc, if these files exist. This may be inhibited by using the --norc option. The --rcfile file option will force bash to read and execute commands from file instead of /etc/bash.bashrc and ~/.bashrc.
2017-12-19 11:05:40 +01:00
Thom Shutt a27e787f90 Fixed grammar 2017-09-08 13:40:26 +01:00
Seth Vargo 0c517573da
Use nospace option for zsh 2017-08-29 12:55:27 -04:00
Josh Bleecher Snyder b74be9ff54 add .bash_profile as a bash rc file
This is common on macs.
2017-05-23 08:04:21 -07:00
Josh Bleecher Snyder e3c14b831e check whether rc file exists during installation 2017-05-23 08:03:54 -07:00
Josh Bleecher Snyder de4cdce279 correctly report installation failures
Prior to this, installations failed silently.
2017-05-23 07:43:32 -07:00
Eyal Posener 14dcbd6b21 cmd: remove adding of flags from run 2017-05-20 22:29:12 +03:00
Eyal Posener 5ba73666ab cmd: fix complete flags name 2017-05-20 22:15:37 +03:00
Eyal Posener 3776c7286e cmd/install: add support for zsh
Fixes: #9
2017-05-13 11:06:15 +03:00
Eyal Posener 9de57bdcf5 Enable completion and executable be the same command
Fixes #6
2017-05-10 19:21:35 +03:00
Eyal Posener 5db452a63f Install fixups
- remove root installation
- install according to shell type

Closes #7
2017-05-08 07:32:13 +03:00
Eyal Posener c20bec01d6 Fix one more vet 2017-05-06 22:26:29 +03:00
Eyal Posener cc743aad8b Fix vet 2017-05-06 22:25:44 +03:00
Eyal Posener 703dd6ebc3 improve docs 2017-05-06 22:15:15 +03:00