diff --git a/zsh/.zshrc b/zsh/.zshrc index 61a3592..0484bb0 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -153,6 +153,10 @@ function zvm_after_init() { bindkey -M emacs "^Y" find_local_files bindkey -M vicmd "^Y" find_local_files bindkey -M viins "^Y" find_local_files + + if [ "$REMOTE_PATH" != "" ]; then + cd $REMOTE_PATH + fi } zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|=*' 'l:|=* r:|=*' @@ -221,12 +225,12 @@ function o () { xdg-open "$1" &! } -function s() { - ssh server@mallorea -t "cd \"$(pwd)\" ; zsh --login" +function server() { + waypipe ssh -t mallorea env REMOTE_PATH="$(pwd)" "zsh --login" } function riva() { - ssh user@riva -t "cd \"$(pwd)\" ; zsh --login" + waypipe ssh -t riva env REMOTE_PATH="$(pwd)" "zsh --login" } if [ "$SSH_CLIENT" ]