Open esauvisky opened 2 years ago
I've never used menu-completion=on
myself. Could you please point me to documentation about it? Or give me a snippet how to enable it?
As for file completion I would really struggle without it. I personally use cod to complete arguments of my own helper scripts and they often accept file arguments. Disabling file completion for them looks like nightmare.
Sorry, I meant menu-complete
, it's a bindable command from readline. Here's the documentation.
If you want to check out the exact setup I use to check the behavior, add this to your .inputrc
:
set bind-tty-special-chars on
TAB: menu-complete
"\e[Z": menu-complete-backward
set menu-complete-display-prefix on
set show-all-if-ambiguous on
set show-all-if-unmodified on
But yes I understand disabling it altogether wouldn't be desirable either. Imho a way of toggling them off using the config file or by calling cod would be the best of both worlds, specially so if it possible to choose the behavior for each completion.
But I'm happy I was able to figure out how to disable them for my particular usecase. cod
is really impressive, terrific job! 😊
When learning new commands, cod forces the addition of file completions with
compgen -f
inside__cod_complete_bash
, but there is no way to turn this behavior off.Personally, I think this should at the very least be a toggleable flag. When using![Untitled](https://user-images.githubusercontent.com/18354658/175263404-461199e7-c7d2-4109-bc6b-d655da10ab33.png)
menu-completion=on
, for example, filenames can really pollute the completions list according to how many files are in the current dir at that moment:A temporary workaround is redefining the
__cod_complete_bash
function after the init script is sourced and commenting the line below: