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

feat: Add terminal completion for the Bash shell #113

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vitor-augusto1
Copy link

#112 Adding Bash completions

@vitor-augusto1
Copy link
Author

Sorry, i forgot the screenshot that shows it working:
image

# You can run the command: $ mv ./gron.bash ~/.bash_completion

function _gron_completion {
local AVAILABLE_COMMANDS="-c --colorize -j --json -k --insecure -m --monochrome -s --stream -u --ungron --no-sort --version"
Copy link

Choose a reason for hiding this comment

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

I'd suggest removing the short options from this list. They are unlikely to be helpful -- if one remembers a short option, one can just type it; if one does not remember, displaying a list of short options is rarely helpful, but rather adds just noise.

FWIW this is the way we do things in bash-completion, guideline from there has some more elaboration/different words, https://github.com/scop/bash-completion/blob/master/CONTRIBUTING.md?plain=1#L136-L149

Copy link

Choose a reason for hiding this comment

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

(I'd suggest moving towards #116 instead of manually maintaining completions separately though.)

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.

None yet

2 participants