Making fzf experience a bit more consistent

[April 16, 2020]

As for increasingly many people, fzf became deeply ingrained into my workflow. But there are few things that I find a bit odd.

First, I don't really see the advantage of having Ctrl-T mapped to "find files in current directory". What I often want is to search only in some subdirectory.

For example:

cp Music/<Ctrl-T>

doesn't quite work for me, because the search starts in my home directory. What I have to use is cp Music/**<Tab>.

Second thing I don't quite understand is why author needed to treat kill command differently than all the other ones - while you need to type **<Tab> for ssh or export, the kill has to be run with kill <Tab> (and kill **<Tab> doesn't work). There's even an issue about the problem, but it seems that it's not going to be merged any time soon, but it contains some pointers on how to fix it.

Okay, so if we invoke fzf consistently with typing **<Tab> in all cases, why we don't map Ctrl-T to do that instead?

If you want to try this, check out my fork of fzf which implements these changes (currently for zsh only.)

Added bonus is not changing default Tab behaviour and not having to worry about special ** syntax at all (which btw. collides with zsh's globbing operator).

If you see any problem with this, please let me know!

EDIT: fzf now supports both kill <Tab> and kill **<Tab>!

Thanks for stopping by! » Discussion on reddit.com