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

A try to make completion work better with default commands. #40

Merged
merged 1 commit into from
May 5, 2023

Conversation

oderwat
Copy link
Contributor

@oderwat oderwat commented May 5, 2023

We are pleased to use 'fisk' for our tooling. There is just one problem for us: When you have a command set as Default(), the completion (we use bash) works in a way, that makes it a bit pointless because it considers only arguments following the default.

I tried different things to fix that. In the end came to the solution to calculate the options with and without the defaults and then, when they differ, return the combination of them. This way, it seems, we can have a meaningful output while still using default commands. From my tests, it also works with multiple default commands (see our newest msgcvt (a tool for nats --translate).

Revived from #39

@oderwat oderwat force-pushed the oderwat-better-completion branch from 7043528 to f755f34 Compare May 5, 2023 15:38
@ripienaar ripienaar merged commit 85bd32e into choria-io:main May 5, 2023
@ripienaar
Copy link
Member

Thank you

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.

2 participants