1
0
Fork 0

use evaluate commands instead of execute keys

This commit is contained in:
andreyorst 2018-09-23 00:24:13 +03:00
parent 9479f5de03
commit 8381d831cc

View file

@ -95,9 +95,9 @@ define-command -override -hidden fzf-cd %{
fzf "change-directory $1" "find \( -path '*/.svn*' -o -path '*/.git*' \) -prune -o -type d -print" fzf "change-directory $1" "find \( -path '*/.svn*' -o -path '*/.git*' \) -prune -o -type d -print"
} }
define-command -override -hidden fzf -params 2 %{ exec %sh{ define-command -override -hidden fzf -params 2 %{ evaluate-commands %sh{
if [ -z "${kak_client_env_TMUX}" ]; then if [ -z "${kak_client_env_TMUX}" ]; then
echo '<esc>:fail "client was not started under tmux"<ret>' echo 'fail "client was not started under tmux"'
exit exit
fi fi
tmp=$(mktemp $(eval echo $kak_opt_fzf_tmp/kak-fzf.XXXXXX)) tmp=$(mktemp $(eval echo $kak_opt_fzf_tmp/kak-fzf.XXXXXX))
@ -136,7 +136,6 @@ define-command -override -hidden fzf-buffer %{ evaluate-commands %sh{
chmod 755 $setbuf chmod 755 $setbuf
chmod 755 $delbuf chmod 755 $delbuf
( (
# todo: expect ctrl-[vw] to make execute in new windows instead
eval "echo $kak_buflist | tr ' ' '\n' | sort | eval "echo $kak_buflist | tr ' ' '\n' | sort |
fzf-tmux -d 15 --color=16 -e --preview='$setbuf {}' --preview-window=up:hidden --expect ctrl-d > $tmp" fzf-tmux -d 15 --color=16 -e --preview='$setbuf {}' --preview-window=up:hidden --expect ctrl-d > $tmp"
if [ -s $tmp ]; then if [ -s $tmp ]; then