diff --git a/kitty/launch.py b/kitty/launch.py index df7fe8190..3e48ba980 100644 --- a/kitty/launch.py +++ b/kitty/launch.py @@ -515,7 +515,7 @@ def clone_and_launch(msg: str, window: Window) -> None: continue env[k] = v elif k == 'cwd': - cwd = v.rstrip() + cwd = v opts = parse_opts_for_clone(args) if cwd: opts.cwd = cwd diff --git a/shell-integration/zsh/kitty-integration b/shell-integration/zsh/kitty-integration index 3798627d3..8585b8852 100644 --- a/shell-integration/zsh/kitty-integration +++ b/shell-integration/zsh/kitty-integration @@ -356,7 +356,7 @@ _ksi_deferred_init() { } clone-in-kitty() { - builtin local data="pid=$$,cwd=$(builtin pwd -P | builtin command base64),env=$(builtin command env -0 | builtin command base64)" + builtin local data="pid=$$,cwd=$(builtin printf "%s" "$PWD" | builtin command base64),env=$(builtin command env -0 | builtin command base64)" while :; do case "$1" in "") break;;