14 lines
411 B
Plaintext
14 lines
411 B
Plaintext
if [ -n "$TMUX_PANE" -a ${FZF_TMUX:-1} -ne 0 -a ${LINES:-40} -gt 15 ]; then
|
|
local height
|
|
height=${FZF_TMUX_HEIGHT:-40%}
|
|
if [[ $height =~ %$ ]]; then
|
|
height="-p ${height%\%}"
|
|
else
|
|
height="-l $height"
|
|
fi
|
|
tmux split-window $height "cd $(printf %q "$PWD"); zsh -c 'tmux send-keys -t $TMUX_PANE \"\$(fzf-fsel)\"'"
|
|
else
|
|
LBUFFER="${LBUFFER}$(fzf-fsel)"
|
|
zle redisplay
|
|
fi
|