Dont define clone-in-kitty in POSIX mode

POSIX mode doesnt allow - in identifiers
This commit is contained in:
Kovid Goyal 2022-04-13 20:55:00 +05:30
parent d0c0b01724
commit 88d597f6b2
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -269,6 +269,9 @@ _ksi_main() {
_ksi_main _ksi_main
builtin unset -f _ksi_main builtin unset -f _ksi_main
case :$SHELLOPTS: in
*:posix:*) ;;
*)
clone-in-kitty() { clone-in-kitty() {
builtin local data="argv=${_ksi_prompt[argv]},cwd=$(builtin printf "%s" "$PWD" | builtin command base64),env=$(builtin command env -0 | builtin command base64)" builtin local data="argv=${_ksi_prompt[argv]},cwd=$(builtin printf "%s" "$PWD" | builtin command base64),env=$(builtin command env -0 | builtin command base64)"
while :; do while :; do
@ -289,3 +292,6 @@ clone-in-kitty() {
done done
builtin printf '\eP@kitty-clone|\e\\' builtin printf '\eP@kitty-clone|\e\\'
} }
;;
esac