6 ms·
Yes, I love tab completion. When I enabled tab completion for git and google cloud CLI, my life became much better. However, I still think there needs to be a
by ronyeh 6y ago
Yes, I love tab completion.
When I enabled tab completion for git and google cloud CLI, my life became much better.
However, I still think there needs to be a "right click menu" for command line programs. Someone needs to determine the 3 most common uses and make it so that --help lets me choose one of them by pressing 1, 2, or 3.
Right now, --help usually gives me something that is difficult for me to understand, especially if I have never used that command before.
Tab completion works great if I have used the command before and want to save time.
- berkes 6y agohence the "starting point". Tab-completion could additionally list the "most common things given the context* I have". Tab-completion needs not nessecarily be postfix. I've seen completion tooling** that would work somewhat like `invoice.pdf<tab> -> `open invoice.pdf\n cp invoice.pdf` etc. And if `<tab>` conflicts, or breaks your mind because it must only work on postfix, it could be anything really, such as `<cmd>-r`. Additionally, or underlying, a reasonable simple command like `whatcan` or `ctxt` (context) could work and be leveraged: `whatcan invoice.pdf` -> a list of common commands given the context* I have. --- * Context I have would be your ~.\_history, the current directory-tree, permissions (why show `mv` if you don't have write access?), applications available, etc. pluggable maybe? ** e.g. the <ctrl>-r, interactive bash history search come to mind as pattern. But also tools like FZF https://github.com/junegunn/fzf#fuzzy-completion-for-bash-and-zsh https://github.com/junegunn/fzf#fuzzy-completion-for-bash-an... that don't nessecarily only "complete" on tab, but may replace larger parts of the commandline.* Edit: formatting.