From 7a903adeeac7c26513e848477c448c92dd63b259 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 14 Jan 2022 22:53:39 +0530 Subject: [PATCH] let _ksi_debug_print handle multiple args --- shell-integration/bash/kitty.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell-integration/bash/kitty.bash b/shell-integration/bash/kitty.bash index 0e0c8420c..fd27caa3c 100644 --- a/shell-integration/bash/kitty.bash +++ b/shell-integration/bash/kitty.bash @@ -22,7 +22,7 @@ _ksi_main() { _ksi_debug_print() { # print a line to STDOUT of parent kitty process - builtin local b=$(builtin printf "%s\n" "$1" | base64 | tr -d \\n) + builtin local b=$(command base64 <<< "${@}" | tr -d \\n) builtin printf "\eP@kitty-print|%s\e\\" "$b" # " } @@ -87,7 +87,7 @@ _ksi_main() { builtin local limit # Send all words up to the word the cursor is currently on builtin let limit=1+$COMP_CWORD - src=$(builtin printf "%s\n" "${COMP_WORDS[@]: 0:$limit}" | kitty +complete bash) + src=$(builtin printf "%s\n" "${COMP_WORDS[@]: 0:$limit}" | command kitty +complete bash) if [[ $? == 0 ]]; then builtin eval ${src} fi