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 ?
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.
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.
if it's alphabetically sorted, I can't imagine it will be too expensive to traverse...
I just tested with around 8000 items. Seems to work pretty fine.
Wooooh #1000
@agnivade shall we close this, in light of #1010's closure?
Yes
Most helpful comment
Wooooh #1000