Using tmux popup window to interact with fzf.
- Compatible with raw fzf
- Support the newest tmux popup feature
- Make sure tmux's version is 3.2 or later.
- Install
fzfp
under your$PATH
.
All options of fzfp
is the same with fzf's except --width
and --height
which will transfer to
tmux popup -w -h
.
TMUX_POPUP_HEIGHT
: height of tmux popup window, default value is80%
, disabled when--height
is existed.TMUX_POPUP_WIDTH
: width of tmux popup window, it's similar toTMUX_POPUP_HEIGHT
.TMUX_POPUP_NESTED_FB
: check whether current pane is nested in popup, fallback to fzf if the return code ofeval "$TMUX_POPUP_NESTED_FB"
is true.
- Use
ls
as the source for fzfp:
ls --color=always | fzfp --ansi --width=50% --height=50%
- Setup fzfp in zsh:
if [[ -n $TMUX_PANE ]] && (( $+commands[tmux] )) && (( $+commands[fzfp] )); then
# fallback to normal fzf if current session name is `floating`
export TMUX_POPUP_NESTED_FB='test $(tmux display -pF "#{==:#S,floating}") == 1'
export TMUX_POPUP_WIDTH=80%
fi