call extra commands for every item
This commit is contained in:
parent
f8fd934e43
commit
02e00153e0
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue