sainnhe / tmux-fzf

Use fzf to manage your tmux work environment!
MIT License
974 stars 50 forks source link

Can't override `:follow` #89

Closed tducasse closed 3 months ago

tducasse commented 4 months ago

Hey!

I'm trying to override the follow preview-window option, but because it's set as the last part of the command, I can't seem to get it to work.

in scripts/.envs

TMUX_FZF_PREVIEW_OPTIONS="--preview='$current_dir/.preview {}' --preview-window=$fzf_preview_window_follow"

and, for example, scripts/pane.sh

target_origin=$(printf "%s\n[cancel]" "$panes" | eval "$TMUX_FZF_BIN $TMUX_FZF_OPTIONS $TMUX_FZF_PREVIEW_OPTIONS")

Ideally, "follow" would be opt-out, maybe by adding an extra variable, TMUX_FZF_FOLLOW=0, which would then default to nofollow instead of follow.

I can probably get a PR out if that's easier for you, just let me know.

sainnhe commented 3 months ago

Sorry for late reply. PR is welcome :)