add sudo when required, remove redirection for cp

main
Stephane Jourdan 2021-01-26 18:01:48 +01:00
parent aa541929c3
commit d6539d3f5e
1 changed files with 4 additions and 4 deletions

View File

@ -164,10 +164,10 @@ Completion scripts are available to use inside the `completions` folder.
```console ```console
# Linux: # Linux:
$ cp completions/dctlenv.bash > /etc/bash_completion.d/dctlenv $ sudo cp completions/dctlenv.bash /etc/bash_completion.d/dctlenv
# MacOS: # MacOS:
$ cp completions/dctlenv.bash > /usr/local/etc/bash_completion.d/dctlenv $ sudo cp completions/dctlenv.bash /usr/local/etc/bash_completion.d/dctlenv
``` ```
Remember to open a new shell to test the functionality. Remember to open a new shell to test the functionality.
@ -190,7 +190,7 @@ $ cp completions/dctlenv.zsh > fpath/completion_folder/_dctlenv
```console ```console
$ mkdir -p ~/.oh-my-zsh/completions $ mkdir -p ~/.oh-my-zsh/completions
$ cp completions/dctlenv.zsh > ~/.oh-my-zsh/completions/_dctlenv $ cp completions/dctlenv.zsh ~/.oh-my-zsh/completions/_dctlenv
``` ```
You will need to start a new shell for this setup to take effect. You will need to start a new shell for this setup to take effect.
@ -198,7 +198,7 @@ You will need to start a new shell for this setup to take effect.
### Fish ### Fish
```console ```console
$ cp completions/dctlenv.fish > ~/.config/fish/completions/dctlenv.fish $ cp completions/dctlenv.fish ~/.config/fish/completions/dctlenv.fish
``` ```
Remember to create the directory if it's not already there `mkdir -p ~/.config/fish/completions/`. Remember to create the directory if it's not already there `mkdir -p ~/.config/fish/completions/`.