Skip to content

Conversation

BenWiederhake
Copy link
Contributor

Fixes #61.

The completion is rather simplistic:

  • Just suggest all possible flags, all the time.
  • If the current word doesn't start with a hyphen, also suggest all files and dirs.

That makes it quite usable, because "flags and files" already covers most usages.

Fancy stuff that is NOT implemented:

  • All ValueHint logic (in particular Strings(Vec<String>), DirPath, ExecutablePath, Username, Hostname would be reasonably easy)
  • dd-style arguments
  • Mutually-exclusive flags/arguments (i.e. if -a and -b can never go together and -a was already given, then don't suggest -b)

All of these features would necessarily need to be implemented in bash, which doesn't sound fun.

@BenWiederhake
Copy link
Contributor Author

Changes since last push:

@BenWiederhake
Copy link
Contributor Author

(Clippy failures are an existing issue, fixed by e.g. #113 )

Copy link
Member

@tertsdiepraam tertsdiepraam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work well enough for a first version! Nice!

@cakebaker cakebaker force-pushed the dev-bash-completion branch from f92e957 to e752a3f Compare April 1, 2025 08:39
@cakebaker cakebaker merged commit 32883b5 into uutils:main Apr 1, 2025
4 checks passed
@BenWiederhake BenWiederhake deleted the dev-bash-completion branch April 11, 2025 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bash completion
3 participants