From 2aa0b0ac1523ea938f2429099c9190742d1bc5c1 Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Mon, 25 Mar 2019 08:43:11 +0300 Subject: [PATCH] use terminal alias when not in tmux --- rc/fzf.kak | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/rc/fzf.kak b/rc/fzf.kak index 6538f43..9dd7992 100644 --- a/rc/fzf.kak +++ b/rc/fzf.kak @@ -177,18 +177,13 @@ fzf -params 2..4 %{ evaluate-commands %sh{ if [ -n "$kak_client_env_TMUX" ]; then [ -n "${tmux_height%%*%}" ] && measure="-l" || measure="-p" - cmd="command tmux split-window $measure ${tmux_height%%%*} 'sh -c $fzfcmd'" - elif [ -n "$kak_opt_termcmd" ]; then - cmd="$kak_opt_termcmd 'sh -c $fzfcmd'" + # cmd="nop %sh{ command tmux split-window $measure ${tmux_height%%%*} 'sh -c $fzfcmd' }" else - printf "%s\n" "fail %{termcmd option is not set}" - rm $fzfcmd - rm $tmp - exit + cmd="terminal %{$fzfcmd}" fi ( - eval "$cmd" + printf "%s\n" "${cmd}" | kak -p ${kak_session} while [ -e $fzfcmd ]; do sleep 0.1 done