A simple Shell script that spawns your terminal of choice with fzf.
sudo curl -o /usr/local/bin/fzfmenu https://raw.githubusercontent.com/illia-shkroba/fzfmenu/refs/heads/master/fzfmenu
sudo chmod +x /usr/local/bin/fzfmenu
Set a $TERMINAL
variable (you probably have it set already) or $FZF_TERMINAL
(the latter takes
precedence). Typically, the $TERMINAL
is set to one of these:
export TERMINAL='st'
export TERMINAL='alacritty'
export TERMINAL='kitty'
It is recommended to use $FZF_TERMINAL
instead of $TERMINAL
, as it allows passing additional
options to the terminal, such as setting a custom window class or other flags. For example:
# Set a window class to 'my-fzf'.
export FZF_TERMINAL='st -c my-fzf'
When you have the $TERMINAL
or $FZF_TERMINAL
set, you are ready to go. Just run the script:
fzfmenu
ls -l ~/ | fzfmenu
# `fzfmenu` passes all the options to the `fzf`.
fzfmenu --color bg+:#000000 --multi
The fzfmenu
works by:
- Launching a new terminal running
fzf
. - Forwarding any provided arguments to
fzf
. - Redirecting standard input (stdin) to
fzf
. - Capturing standard output (stdout) from
fzf
. - Capturing standard error output (stderr) from
fzf
.
Contributions are welcome! Feel free to open a GitHub issue for bug reports, feature requests, or discussions. Pull requests are also welcome.