From a350e7b40a9966244ecaa0c07284dc7645123d6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yngve=20H=C3=B8iseth?= Date: Sat, 20 Apr 2019 12:14:51 +0200 Subject: [PATCH 1/3] Fix missing directory error --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 720c51b06b..2c80ccb715 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,7 @@ $ rustup completions bash > ~/.local/share/bash_completion/completions/rustup $ rustup completions bash > $(brew --prefix)/etc/bash_completion.d/rustup.bash-completion # Fish +$ mkdir ~/.config/fish/completions $ rustup completions fish > ~/.config/fish/completions/rustup.fish # Zsh From 772c291370c8751ac33400f8d93579f40c3efb1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yngve=20H=C3=B8iseth?= Date: Sun, 21 Apr 2019 16:07:03 +0200 Subject: [PATCH 2/3] Create parent directories if necessary --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2c80ccb715..3e6dfbd14d 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ $ rustup completions bash > ~/.local/share/bash_completion/completions/rustup $ rustup completions bash > $(brew --prefix)/etc/bash_completion.d/rustup.bash-completion # Fish -$ mkdir ~/.config/fish/completions +$ mkdir -p ~/.config/fish/completions $ rustup completions fish > ~/.config/fish/completions/rustup.fish # Zsh From a1f3bd9f821abf1f298ec8e8987c566f6a266d84 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sun, 21 Apr 2019 21:46:38 +0100 Subject: [PATCH 3/3] help: Update completions help to include mkdirs In order to ensure that people have the completions directory in existence before trying to write to it, include `mkdir -p` commands in the completions help. Signed-off-by: Daniel Silverstone --- src/cli/help.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cli/help.rs b/src/cli/help.rs index 8893a8cb2e..5074368e34 100644 --- a/src/cli/help.rs +++ b/src/cli/help.rs @@ -169,6 +169,7 @@ r"DISCUSSION: `~/.local/share/bash_completion/completions` for user-specific commands. Run the command: + $ mkdir -p ~/.local/share/bash_completion/completions $ rustup completions bash >> ~/.local/share/bash_completion/completions/rustup This installs the completion script. You may have to log out and @@ -179,6 +180,7 @@ r"DISCUSSION: Homebrew stores bash completion files within the Homebrew directory. With the `bash-completion` brew formula installed, run the command: + $ mkdir -p $(brew --prefix)/etc/bash_completion.d $ rustup completions bash > $(brew --prefix)/etc/bash_completion.d/rustup.bash-completion FISH: @@ -186,6 +188,7 @@ r"DISCUSSION: Fish completion files are commonly stored in `$HOME/.config/fish/completions`. Run the command: + $ mkdir -p ~/.config/fish/completions $ rustup completions fish > ~/.config/fish/completions/rustup.fish This installs the completion script. You may have to log out and