summary refs log tree commit diff
path: root/home
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-10-27 11:09:34 -0400
committerJune McEnroe <june@causal.agency>2020-10-27 11:09:34 -0400
commit890b68a896d1197f7e999d985872f76369ed1bcb (patch)
treefa599c3b5d8137cf4112092a2753ab5694959cfd /home
parentAllow cd host:path over ssh (diff)
downloadsrc-890b68a896d1197f7e999d985872f76369ed1bcb.tar.gz
src-890b68a896d1197f7e999d985872f76369ed1bcb.zip
Use SendEnv for cd host:path
Works properly for weird paths, etc.
Diffstat (limited to 'home')
-rw-r--r--home/.shrc2
1 files changed, 1 insertions, 1 deletions
diff --git a/home/.shrc b/home/.shrc
index df1c8b26..2c3b4740 100644
--- a/home/.shrc
+++ b/home/.shrc
@@ -21,7 +21,7 @@ cd() {
 	if [ $# -eq 0 ]; then
 		builtin cd
 	elif [ "${1%%:*}" != "$1" ]; then
-		ssh -o "SetEnv SSH_CD=${1#*:}" "${1%%:*}"
+		SSH_CD=${1#*:} ssh -o SendEnv=SSH_CD "${1%%:*}"
 	elif [ -e "$1" -a ! -d "$1" ]; then
 		builtin cd "${1%/*}" && $EDITOR "${1##*/}"
 	else