Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Force file completion when hitting TAB twice



On Fri, 18 Dec 2009 13:28:06 +0100
Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx> wrote:

> What I do, if compsys is too smart in some situations is that I invoke
> a widget that does nothing but file completion. I got that on a
> separate keybinding - namely '^xf'.
> 
>     zle -C complete-files complete-word _generic
>     zstyle ':completion:complete-files:*' completer _files
>     bindkey '^xf' complete-files
> 
> I do the same to complete words that are in my history, for which I
> got a binding on '^xh':
> 
>     zle -C complete-history complete-word _generic
>     zstyle ':completion:complete-history:*' completer _history
>     bindkey '^xh' complete-history
> 
> So, everytime <tab> tries to be smarter than it should, I'm hitting
> ^xf and be done with it.

That's a good suggestion.

I would have preferred to the '_complete_failed' approach better,
but there's no point if I *already* found a widget that breaks it.
I need something that can get me out every time.

The history completer is also nice to re-use old file names.

Thanks for all the suggestions.
Very appreciated.




Messages sorted by: Reverse Date, Date, Thread, Author