fix: setup should be run once
This commit is contained in:
parent
b1208f9db5
commit
e99114e695
@ -80,7 +80,7 @@ EXAMPLE:
|
|||||||
switch shellType {
|
switch shellType {
|
||||||
case "bash":
|
case "bash":
|
||||||
fmt.Println(fmt.Sprintf(`
|
fmt.Println(fmt.Sprintf(`
|
||||||
# run the following commands to install auto-completion
|
# run the following commands once to install auto-completion
|
||||||
sudo mkdir -p /etc/bash_completion.d/
|
sudo mkdir -p /etc/bash_completion.d/
|
||||||
sudo cp %s /etc/bash_completion.d/abra
|
sudo cp %s /etc/bash_completion.d/abra
|
||||||
echo "source /etc/bash_completion.d/abra" >> ~/.bashrc
|
echo "source /etc/bash_completion.d/abra" >> ~/.bashrc
|
||||||
@ -88,7 +88,7 @@ echo "source /etc/bash_completion.d/abra" >> ~/.bashrc
|
|||||||
`, autocompletionFile))
|
`, autocompletionFile))
|
||||||
case "zsh":
|
case "zsh":
|
||||||
fmt.Println(fmt.Sprintf(`
|
fmt.Println(fmt.Sprintf(`
|
||||||
# run the following commands to install auto-completion
|
# run the following commands to once install auto-completion
|
||||||
sudo mkdir -p /etc/zsh/completion.d/
|
sudo mkdir -p /etc/zsh/completion.d/
|
||||||
sudo cp %s /etc/zsh/completion.d/abra
|
sudo cp %s /etc/zsh/completion.d/abra
|
||||||
echo "PROG=abra\n_CLI_ZSH_AUTOCOMPLETE_HACK=1\nsource /etc/zsh/completion.d/abra" >> ~/.zshrc
|
echo "PROG=abra\n_CLI_ZSH_AUTOCOMPLETE_HACK=1\nsource /etc/zsh/completion.d/abra" >> ~/.zshrc
|
||||||
@ -96,7 +96,7 @@ echo "PROG=abra\n_CLI_ZSH_AUTOCOMPLETE_HACK=1\nsource /etc/zsh/completion.d/abra
|
|||||||
`, autocompletionFile))
|
`, autocompletionFile))
|
||||||
case "fish":
|
case "fish":
|
||||||
fmt.Println(fmt.Sprintf(`
|
fmt.Println(fmt.Sprintf(`
|
||||||
# run the following commands to install auto-completion
|
# run the following commands once to install auto-completion
|
||||||
sudo mkdir -p /etc/fish/completions
|
sudo mkdir -p /etc/fish/completions
|
||||||
sudo cp %s /etc/fish/completions/abra
|
sudo cp %s /etc/fish/completions/abra
|
||||||
echo "source /etc/fish/completions/abra" >> ~/.config/fish/config.fish
|
echo "source /etc/fish/completions/abra" >> ~/.config/fish/config.fish
|
||||||
|
@ -87,7 +87,7 @@ function install_abra_release {
|
|||||||
|
|
||||||
x=$(echo $PATH | grep $HOME/.local/bin)
|
x=$(echo $PATH | grep $HOME/.local/bin)
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "$(tput setaf 3)WARNING: $HOME/.local/bin/ is not in \$PATH! If you want to run abra by just typing "abra" you should add it to your \$PATH! To do that run:$(tput sgr0)"
|
echo "$(tput setaf 3)WARNING: $HOME/.local/bin/ is not in \$PATH! If you want to run abra by just typing "abra" you should add it to your \$PATH! To do that run this once and restart your terminal:$(tput sgr0)"
|
||||||
p=$HOME/.local/bin
|
p=$HOME/.local/bin
|
||||||
com="echo PATH=\$PATH:$p"
|
com="echo PATH=\$PATH:$p"
|
||||||
if [[ $SHELL =~ "bash" ]]; then
|
if [[ $SHELL =~ "bash" ]]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user