fzf-tab
fzf-tab copied to clipboard
Display completion on multiple columns [FR]
Just a quick feature: multicolumns
Problem
Often my terminals are wider than taller.
Describe the solution you'd like
The one in the title.
Additional context
I just moved to fzf-tab
from the default autocompletion coming with oh-my-zsh
. It's wonderful and plenty of features, but the very only thing I lack it's having the completion spanning the full length of my terminal.
This is not always what I want: sometimes it's far better to have them on a single column, e.g. when the options are described, but this is exactly what happened with the former completion (oh-my-zsh
).
Probably it's just a matter of taste, but I tried to look in the repo, the wiki and the issues for configuring fzf-tab
this way and I didn't find anything. Since quite a lot of other configs are available, why not this one? (the moment someone is able to implement it...)
This should be a feature request for fzf
, no?
I might be wrong but the bare fzf
displays differently form fzf-tab
on my machine, so I assume it is doing some formatting.
At the end of the day fzf
it's supposed to be the backend, not the formatter, am I wrong?
-
fzf
-
fzf-tab
It's not impossible to implement this on top of fzf
, but it would be a hack. This feature is a general thing for fzf
, and needs to be its own thing. Worst case scenario, the hack itself needs to be a separate repo fzf-multicolumn
, so that it is reusable.
PS: Check out lib/-ftb-fzf
to see the fzf command that fzf-tab finally runs.
As NightMachinary said, this is impossible unless I fork fzf. (In fact, I indeed have such a plan)
As NightMachinary said, this is impossible unless I fork fzf. (In fact, I indeed have such a plan)
fzf might accept a PR there: https://github.com/junegunn/fzf/issues/1476
Looks like junegunn also provided a solution using tmux, using an alternative command that is directly available from the fzf main repo: fzf-tmux
If you're on tmux, using fzf-tmux can be an option. e.g. fzf-tmux -r 20%
It's not really the multicolumn layout I wished, but it can be an option, at least for someone. Is it possible to use that one as a backend for fzf-tab? Just adding it in the configuration like:
zstyle ':fzf-tab:*' fzf-command "fzf-tmux -r 20%"
(this exact one is currently not working)
Checkout https://github.com/Aloxaf/fzf-tab/wiki/Configuration#fzf-command if you want to use fzf-tmux
@NICHOLAS85 I checked, and indeed I took the command above exactly from there, but it is not junegunn's fzf-tmux
!
Moreover ftb-tmux-popup
explicitly requires tmux version 3.2, and e.g. I'm on plain Ubuntu 20.10 (rather a common setup) and tmux version is 3.1b.
Thank you very much for your advice, it's quite fancy and interesting (this is why I already checked :wink:) but definitely it's not the same thing.
P.S.: mine was a follow up on @NightMachinary 's linked PR, but it's rather off topic in this issue.