From 1183e716bc96a36e0a4a624ed0ccbd26e60a2dec Mon Sep 17 00:00:00 2001 From: basbebe Date: Thu, 4 Mar 2021 20:43:13 +0100 Subject: [PATCH] make kitty repl command consistent with other kitty commands --- rc/windowing/repl/kitty.kak | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/rc/windowing/repl/kitty.kak b/rc/windowing/repl/kitty.kak index b57d6f79..2b7bb2a0 100644 --- a/rc/windowing/repl/kitty.kak +++ b/rc/windowing/repl/kitty.kak @@ -17,7 +17,18 @@ define-command -params .. -shell-completion \ else cmd="$*" fi - kitty @ new-window --no-response --window-type $kak_opt_kitty_window_type --title kak_repl_window --cwd "$PWD" $cmd < /dev/null > /dev/null 2>&1 & + + match="" + if [ -n "$kak_client_env_KITTY_WINDOW_ID" ]; then + match="--match=id:$kak_client_env_KITTY_WINDOW_ID" + fi + + listen="" + if [ -n "$kak_client_env_KITTY_LISTEN_ON" ]; then + listen="--to=$kak_client_env_KITTY_LISTEN_ON" + fi + + kitty @ $listen launch --no-response --keep-focus --type="$kak_opt_kitty_window_type" --title=kak_repl_window --cwd="$PWD" $match $cmd } } @@ -34,7 +45,7 @@ define-command -hidden -params 0..1 \ else text="$1" fi - kitty @ send-text -m=title:kak_repl_window "$text" + kitty @ send-text --match=title:kak_repl_window "$text" } }