From: martin f. krafft Date: Thu, 7 May 2020 10:42:54 +0000 (+1200) Subject: escape dir in sshcd X-Git-Url: https://git.madduck.net/etc/ssh.git/commitdiff_plain/361eacfe215343d432812e29bd6369783679b210?hp=28e3d69d17ced85acbd61b97e6003f15030f9576 escape dir in sshcd --- diff --git a/.zsh/zshrc/parts.d/50-ssh b/.zsh/zshrc/parts.d/50-ssh index d872af2..166fa12 100644 --- a/.zsh/zshrc/parts.d/50-ssh +++ b/.zsh/zshrc/parts.d/50-ssh @@ -60,7 +60,7 @@ sshcd() { else - ssh -t $args $host "cd '$dir' && exec \$SHELL --login" + ssh -t $args $host "cd '${dir:gs/\'/\'\\\'\'}' && exec \$SHELL --login" fi }