You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, in tlrc v1.8.0 installed via brew, the autocompletion doesn't seem to support displaying page possibilities. i.e. If I type tldr aws and press tab, the output should show all the possibilities for aws subcommands.
We support this feature in all our official clients. It would be great if tlrc supports it too.
Ways to implement it
Use an external command to search all .md pages in cache and display it in autocompletion.
Use a native Rust library or feature to build the index locally (depending on the way it is implemented, this might have some performance issues or offer better performance).
There's an option in the config to change the cache directory. We can't hard-code the path in the completion script.
Use a native Rust library
This is the current approach - generate completions automatically using clap_complete. The downside of this is that everything the completion suggests has to be known at compile-time, so we can't use it either.
Parse and use our existing JSON index
That is certainly possible, but would require caching the index somewhere and using some kind of JSON parser in the completion script, which adds an extra dependency.
I think the best solution is to use the output of tldr --list-all.
Currently, in
tlrc
v1.8.0 installed viabrew
, the autocompletion doesn't seem to support displaying page possibilities. i.e. If I typetldr aws
and press tab, the output should show all the possibilities foraws
subcommands.We support this feature in all our official clients. It would be great if
tlrc
supports it too.Ways to implement it
.md
pages in cache and display it in autocompletion.The text was updated successfully, but these errors were encountered: