rust-lang / rust-lang/rustup

Use symlink for zsh completion _cargo

Open
#2,101 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
22h 40m
Merged PRs (30d)
46

Description

Describe the problem you are trying to solve

Stay up to date with zsh completion for cargo.

Describe the solution you'd like

ln -s $(rustc --print sysroot)/share/zsh/site-functions/_cargo ~/.zfunc

Notes

diff --git i/src/cli/help.rs w/src/cli/help.rs
index 6445625..b531503 100644
--- i/src/cli/help.rs
+++ w/src/cli/help.rs
@@ -272,7 +272,7 @@ r"DISCUSSION:
 
     ZSH:
 
-        $ rustup completions zsh cargo > ~/.zfunc/_cargo";
+        $ ln -s $(rustc --print sysroot)/share/zsh/site-functions/_cargo ~/.zfunc";
 
 pub static TOOLCHAIN_ARG_HELP: &str = "Toolchain name, such as 'stable', 'nightly', \
                                        or '1.8.0'. For more information see `rustup \

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/cli/help.rs, where the ZSH completion instructions are shown in the cargo help text. Review the existing completion guidance and verify the help output uses the requested symlink command; done means the documented instructions keep the _cargo completion up to date.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, zsh
Domain
cli
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.