Skip to content

Commit ece7d09

Browse files
committed
Advise overwrite rather than append to existing bash completion files
There should be no reason to append to existing ones. Other similar completion file install recipes overwrite, too.
1 parent 30f5e62 commit ece7d09

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: src/cli/help.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ pub(crate) static COMPLETIONS_HELP: &str = r"Discussion:
175175
Run the command:
176176
177177
$ mkdir -p ~/.local/share/bash-completion/completions
178-
$ rustup completions bash >> ~/.local/share/bash-completion/completions/rustup
178+
$ rustup completions bash > ~/.local/share/bash-completion/completions/rustup
179179
180180
This installs the completion script. You may have to log out and
181181
log back in to your shell session for the changes to take effect.
@@ -270,7 +270,7 @@ pub(crate) static COMPLETIONS_HELP: &str = r"Discussion:
270270
271271
Bash:
272272
273-
$ rustup completions bash cargo >> ~/.local/share/bash-completion/completions/cargo
273+
$ rustup completions bash cargo > ~/.local/share/bash-completion/completions/cargo
274274
275275
Zsh:
276276

Diff for: tests/suite/cli-ui/rustup/rustup_completions_cmd_help_flag_stdout.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Discussion:
3232
Run the command:
3333
3434
$ mkdir -p ~/.local/share/bash-completion/completions
35-
$ rustup completions bash >> ~/.local/share/bash-completion/completions/rustup
35+
$ rustup completions bash > ~/.local/share/bash-completion/completions/rustup
3636
3737
This installs the completion script. You may have to log out and
3838
log back in to your shell session for the changes to take effect.
@@ -128,7 +128,7 @@ Discussion:
128128
129129
Bash:
130130
131-
$ rustup completions bash cargo >> ~/.local/share/bash-completion/completions/cargo
131+
$ rustup completions bash cargo > ~/.local/share/bash-completion/completions/cargo
132132
133133
Zsh:
134134

0 commit comments

Comments
 (0)