From 84c7883b70865096ff773416e2d3b75b1dcc0070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= <email@thomasave.be> Date: Mon, 1 Apr 2024 00:05:58 +0200 Subject: [PATCH] Use waypipe by default --- zsh/.zshrc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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" ]