1
0
Fork 0

call extra commands for every item

This commit is contained in:
Andrey Orst 2018-11-24 21:58:45 +03:00
parent f8fd934e43
commit 02e00153e0

View file

@ -165,15 +165,18 @@ fzf -params 2..4 %{ evaluate-commands %sh{
ctrl-v) ctrl-v)
wincmd="tmux-new-horizontal" ;; wincmd="tmux-new-horizontal" ;;
*) *)
[ -n "$action" ] && printf "%s\n" "evaluate-commands -client $kak_client '$command' '$action'" | kak -p $kak_session ;; if [ -n "$action" ]; then
printf "%s\n" "evaluate-commands -client $kak_client '$command' '$action'" | kak -p $kak_session
[ -n "$extra_action" ] && printf "%s\n" "evaluate-commands -client $kak_client $extra_action" | kak -p $kak_session
fi ;;
esac esac
kakoune_command() { kakoune_command() {
printf "%s\n" "evaluate-commands -client $kak_client $wincmd $command %{$1}" printf "%s\n" "evaluate-commands -client $kak_client $wincmd $command %{$1}"
[ -n "$extra_action" ] && printf "%s\n" "evaluate-commands -client $kak_client $extra_action"
} }
while read item; do while read item; do
kakoune_command "$item" | kak -p $kak_session kakoune_command "$item" | kak -p $kak_session
done done
[ -n "$extra_action" ] && printf "%s\n" "evaluate-commands -client $kak_client $extra_action" | kak -p $kak_session
) < $tmp ) < $tmp
fi fi
rm $tmp rm $tmp