You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be very useful to show fzy under prompt, so the currently typed command remains visible.
Let's say you want to open two files at once in vim. Because fzy lacks multiselect, the only available way is to trigger zsh-fzy multiple times. With #11 I sneaked in a little patch that allows to do so with just pressing Ctrl+T instead of <Space>Ctrl+T, but because you can't see the prompt you can easily forget which files you've already selected and which not.
Same applies for proc widget, if you want to kill multiple processes at once, you want to see your kill command build up, select first process, see that your kill became kill 1234 , select second process, see that your command expanded to kill 1234 5678 , etc.
I didn't find yet how fzf achieves this, do you have a hint for me maybe?
I even think this behavior should replace the current behavior, i.e. I wouldn't add a configuration option to return the current approach where fzy overlays prompt. But if you deliberately wanted this, then of course I'm happy to make it configurable.
The text was updated successfully, but these errors were encountered:
Great suggestion! I didn't really know how to do this, but while thinking how nice this would be in order to make fzy behave like the Zsh completion menus, which also appear under the prompt, it crossed my mind that there's probably something in Zsh that can do the “print below the prompt, go back to the prompt afterwards” routine. And there is a way:
functionsome-widget {
zle -M 'some string'# Now call fzy, do things.
zle redisplay
}
Adding the above to a widget function will make Zle save the prompt position, print some string below the prompt, which causes the terminal cursor to go down one line, and the redisplay will go back and repaint the prompt in the saved position. Because the cursor went down one line, invoking fzy now overwrites some string instead of the prompt.
It would be very useful to show fzy under prompt, so the currently typed command remains visible.
Let's say you want to open two files at once in
vim
. Because fzy lacks multiselect, the only available way is to trigger zsh-fzy multiple times. With #11 I sneaked in a little patch that allows to do so with just pressingCtrl+T
instead of<Space>Ctrl+T
, but because you can't see the prompt you can easily forget which files you've already selected and which not.Same applies for proc widget, if you want to kill multiple processes at once, you want to see your
kill
command build up, select first process, see that yourkill
becamekill 1234
, select second process, see that your command expanded tokill 1234 5678
, etc.I didn't find yet how fzf achieves this, do you have a hint for me maybe?
I even think this behavior should replace the current behavior, i.e. I wouldn't add a configuration option to return the current approach where fzy overlays prompt. But if you deliberately wanted this, then of course I'm happy to make it configurable.
The text was updated successfully, but these errors were encountered: