Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rudimentary bash completion #115

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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 )

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
1 participant