Skip to content

Commit 9a99cf4

Browse files
authored
Merge pull request rust-lang#1035 from bitjson/docs/homebrew-completions
Add bash completion guidance for macOS users
2 parents 369150a + 25edf1e commit 9a99cf4

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ gist is as simple as using one of the following:
6666
# Bash
6767
$ rustup completions bash > /etc/bash_completion.d/rustup.bash-completion
6868
69+
# Bash (macOS/Homebrew)
70+
$ rustup completions bash > $(brew --prefix)/etc/bash_completion.d/rustup.bash-completion
71+
6972
# Fish
7073
$ rustup completions fish > ~/.config/fish/completions/rustup.fish
7174

src/rustup-cli/help.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,13 @@ r"DISCUSSION:
162162
This installs the completion script. You may have to log out and
163163
log back in to your shell session for the changes to take affect.
164164
165+
BASH (macOS/Homebrew):
166+
167+
Homebrew stores bash completion files within the Homebrew directory.
168+
With the `bash-completion` brew formula installed, run the command:
169+
170+
`rustup completions bash > $(brew --prefix)/etc/bash_completion.d/rustup.bash-completion`
171+
165172
FISH:
166173
167174
Fish completion files are commonly stored in

0 commit comments

Comments
 (0)