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

Re: Force file completion when hitting TAB twice



Yuri D'Elia <wavexx@xxxxxxxxxxxx>:
[...]
> The 'git' completion is such and example of recurring headache.
> 
> git status [TAB TAB] still doesn't offer me a list of files with this
> code (others, like ssh, do).
> 
> Ideas?

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.

Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925



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