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

Adding bash command completion #1000

Closed
agnivade opened this issue Aug 10, 2016 · 7 comments
Closed

Adding bash command completion #1000

agnivade opened this issue Aug 10, 2016 · 7 comments
Labels
clients Issues pertaining to a particular client or the clients as whole.

Comments

@agnivade
Copy link
Member

agnivade commented Aug 10, 2016

Hello,

I think adding command completion would be a nice feature addition to this project.

Adding it is very simple as we just have to place a file in /etc/bash-completion.d/ and bash will source it everytime it loads (For zsh also, its something similar although I haven't researched much about it). The problem is the file needs to have the list of all commands that are present.

Now, this is something I wanted to discuss about. I believe the responsibility of placing the file in the folder (/etc/bash_completion.d/) goes to the respective clients. So, I propose creating a completion file 'tldr', which will get updated with each push (through another function added in scripts/build.sh), and keeping it in the scripts folder. After this, every client will pull the file and place it in that folder in the install step.

Does this seem reasonable ?

@leostera
Copy link
Contributor

It'd be interesting to see how much of an overhead it becomes. 100 commands might not be a problem, but if there's 10,000 of them, then it might be problematic.

@leostera
Copy link
Contributor

Sorry, the overhead I meant was not when building this list, but when bash parsed it originally, and then whenever you TAB to autocomplete or see suggestions.

@waldyrious
Copy link
Member

if it's alphabetically sorted, I can't imagine it will be too expensive to traverse...

@agnivade
Copy link
Member Author

I just tested with around 8000 items. Seems to work pretty fine.

@waldyrious waldyrious added clients Issues pertaining to a particular client or the clients as whole. page edit Changes to an existing page(s). labels Aug 10, 2016
@waldyrious waldyrious removed the page edit Changes to an existing page(s). label Aug 31, 2016
@rubenvereecken
Copy link
Contributor

Wooooh #1000

@waldyrious
Copy link
Member

@agnivade shall we close this, in light of #1010's closure?

@agnivade
Copy link
Member Author

agnivade commented May 7, 2017

Yes

@agnivade agnivade closed this as completed May 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clients Issues pertaining to a particular client or the clients as whole.
Projects
None yet
Development

No branches or pull requests

4 participants