mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-27 03:42:49 +00:00
Bash integration: Fix clone-in-kitty not working on bash >= 5.2 if environment variable values contain newlines or other special characters
Bash >= 5.2 changed the export command to output values using $' escaping when they contain special characters. Fixes #5629
This commit is contained in:
parent
4fc91dcc03
commit
51bba9110e
5 changed files with 163 additions and 37 deletions
|
|
@ -332,7 +332,8 @@ _ksi_transmit_data() {
|
|||
}
|
||||
|
||||
clone-in-kitty() {
|
||||
builtin local data="shell=bash,pid=$$,cwd=$(builtin printf "%s" "$PWD" | builtin command base64),envfmt=bash,env=$(builtin export | builtin command base64)"
|
||||
builtin local bv="${BASH_VERSINFO[0]}.${BASH_VERSINFO[1]}.${BASH_VERSINFO[2]}"
|
||||
builtin local data="shell=bash,pid=$$,bash_version=$bv,cwd=$(builtin printf "%s" "$PWD" | builtin command base64),envfmt=bash,env=$(builtin export | builtin command base64)"
|
||||
while :; do
|
||||
case "$1" in
|
||||
"") break;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue