shellex
shellex copied to clipboard
fzf command history integration
fzf
(https://github.com/junegunn/fzf) enables fuzzy-searching the command history (among other things).
When I'm in a regular shell I can hit Ctrl+R and filter with fuzzy-search through previous commands.
Is there a way to achieve this is shellex
?
Thanks
Hi,
since shellex just runs a zsh
, and fzf
lists zsh
as supported shells, I claim fzf
should just work out of the box in shellex
. You'd only need to create a config file like ${HOME}/.shellex/99-fzf
which contains what you'd put in your ${HOME}/.zshrc
to use fzf
in zsh
. I'll give it a try in the next days.
Cheers.
following what fzf
does in the installation, I added
export PATH="$PATH:/home/pseyfert/coding/fzf/bin"
source /home/pseyfert/coding/fzf/shell/key-bindings.zsh
to ~/.shellex/99-fzf
. fzf
mostly works, the problem is that the resizing of shellex
doesn't let you see the search results, so that's kind of useless.
As a hack one could prevent shrinking of the window in urxvt/shellex.in
in on_line_update
, or at least shrinking to less than 20 lines, but then you have the large shellex, even after you picked your match and want to edit the line further. It should be possible to do better…
Thanks for your efforts!
I guess I could work with fixed-lines-height.
Related question:
When I'm running shellex
from my current terminal it works as you described.
But when I'm running from 'Alt-F2` (command launcher on Ubuntu) I get:
fzf-history-widget:4: command not found: fzf
Anyway to fix this?
I also had that first, do you have your equivalent of the line
export PATH="$PATH:/home/pseyfert/coding/fzf/bin"
right?
Also, assuming you already have fzf
installed for your regular shell, I assume you ran the install
script in fzf
at some point. Do you have a fzf/bin/fzf
executable? In my case - not to mess with my standard shell - I ran ./install --no-bash --no-zsh --no-fish
, such that the executable is prepared but no rc file manipulated.
Oh, my bad(!) I had a typo in the export
line..
Thanks again
In my case, the problem was that I cloned the repository, but did not compile the fzf
binary file.
Go to your fzf installation path, and run ./install
:
$ cd $FZF_BASE && ./install
Hope it helps!