Get _ksi_debug_print working again

This commit is contained in:
Kovid Goyal 2021-12-31 22:38:39 +05:30
parent 79ec8b60b9
commit ff63e58f95
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -32,10 +32,13 @@ builtin emulate -L zsh -o no_warn_create_global
# 2: none of the above.
builtin typeset -gi _ksi_state
# Asks kitty to print $@ to its stdout. This is for debugging.
# Asks kitty to print $@ to its STDOUT. This is for debugging.
_ksi_debug_print() {
builtin local data
data=$(command base64 <<<"${(j: :}@}") || builtin return
builtin local data saved
saved="$IFS"
IFS=" "
data=$(command base64 <<< "$*")
IFS="$saved"
builtin printf '\eP@kitty-print|%s\e\\' "${data//$'\n'}"
}