uutils / uutils/coreutils

zsh completion for file arguments can be improved

Open
#10,221 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Description

  • 372baf4dd4548db52d8f62d9e727d147c491cad7
  • zsh: 5.9
make target/debug/uudoc
# e.g.
./target/debug/uudoc completion cat zsh

The snippet above prints

     5  _cat() {
…
    35  '-h[Print help]' \
    36  '--help[Print help]' \
    37  '-V[Print version]' \
    38  '--version[Print version]' \
    39  '::file:_files' \
    40  && ret=0
    41  }
  • it is preferable to prepend (- *) to -h, --help, -V, and --version to stop further completion
  • * should be prepended to ::file:_files to complete multiple files

At the moment cat, b2sum, chmod, and so forth completes a single file only.

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

Build target/debug/uudoc and run the provided completion command for zsh, then inspect how completion definitions are generated for cat, b2sum, and chmod. Done means the generated zsh snippet prevents option completion after a file argument and supports completing multiple files.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, zsh
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.