(Website) Cannot generate completions for bash and zsh without sudo
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 68/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- bash, zsh
- Domain
- cli, documentation
Research direction
Open the website page at usage.jdx.dev/cli/completions and locate the bash and zsh installation instructions shown in the issue. Update the commands so privileged writes use sudo with tee, then check that both examples are accurate and no longer rely on shell redirection into protected directories.
Written by the indexing model from the issue text.
Description
On the website the instructions for generating completions for bash and zsh are given as:
usage --completions bash > /etc/bash_completion.d/usage
usage --completions zsh > /usr/share/zsh/site-functions/_usage
The problem is redirection to those directories requires root access so both commands would fail. Here is the improved version using 'tee' with 'sudo':
usage --completions bash | sudo tee /etc/bash_completion.d/usage
usage --completions zsh | sudo tee /usr/share/zsh/site-functions/_usage
If echoing the content of completions to stdout is undesirable, it can be hidden:
usage --completions bash | sudo tee /etc/bash_completion.d/usage >/dev/null
usage --completions zsh | sudo tee /usr/share/zsh/site-functions/_usage >/dev/null
- Dominant language
- Rust
- Stars
- 1k
- Forks
- 59
- Avg merge
- 5h 58m
- Merged PRs (30d)
- 362
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jdx/usage
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 70/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bitcoindevkit/bdk-ffi#1125 ·