make kitty repl command consistent with other kitty commands

This commit is contained in:
basbebe 2021-03-04 20:43:13 +01:00
parent 8d5d0d7d90
commit 1183e716bc
No known key found for this signature in database
GPG Key ID: 1E18AD713D17B254

View File

@ -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"
}
}