From 1470f3eb33c28d447486ac6ae88183971271cd0c Mon Sep 17 00:00:00 2001 From: Brian Ericson Date: Thu, 25 Apr 2019 21:45:02 -0500 Subject: [PATCH] Fix local bash completion directory path Per https://github.com/scop/bash-completion/blob/master/README.md's "FAQ", bash looks for local completions in "bash-completion" (a "-" instead of an "_", or ~/.local/share/bash-completion/completions). --- README.md | 2 +- src/cli/help.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3e6dfbd14d..bf22ae87cf 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ but the gist is as simple as using one of the following: ```console # Bash -$ rustup completions bash > ~/.local/share/bash_completion/completions/rustup +$ rustup completions bash > ~/.local/share/bash-completion/completions/rustup # Bash (macOS/Homebrew) $ rustup completions bash > $(brew --prefix)/etc/bash_completion.d/rustup.bash-completion diff --git a/src/cli/help.rs b/src/cli/help.rs index 5074368e34..bc2310a5c4 100644 --- a/src/cli/help.rs +++ b/src/cli/help.rs @@ -166,11 +166,11 @@ r"DISCUSSION: Completion files are commonly stored in `/etc/bash_completion.d/` for system-wide commands, but can be stored in in - `~/.local/share/bash_completion/completions` for user-specific commands. + `~/.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 + $ 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 log back in to your shell session for the changes to take affect. @@ -265,7 +265,7 @@ r"DISCUSSION: BASH: - $ rustup completions bash cargo >> ~/.local/share/bash_completion/completions/cargo + $ rustup completions bash cargo >> ~/.local/share/bash-completion/completions/cargo ZSH: