From fd8d1b359794cb466d5bf0540f6ba176b2e97020 Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 13 Oct 2022 18:46:04 +0200 Subject: perfect --- .config/zsh/alias.zsh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to '.config') diff --git a/.config/zsh/alias.zsh b/.config/zsh/alias.zsh index 4fc5c4d..c3839ca 100644 --- a/.config/zsh/alias.zsh +++ b/.config/zsh/alias.zsh @@ -61,8 +61,20 @@ alias \ lg='lazygit' \ gjdo='/home/jozan/dev/perl/gitjoe-scripts/gitjoe-do.pl' \ dgit='git --git-dir=$HOME/docs/dotfiles-bsd --work-tree=$HOME' \ - confgit='git --git-dir=$HOME/docs/conffiles-bsd --work-tree=/' \ - bssh='ssh rbousset@bastion -t -- ' + confgit='git --git-dir=$HOME/docs/conffiles-bsd --work-tree=/' +bssh() { + if [ "$1" != "--osh" ]; then + tmp="$1" + shift 1 + if ! grep -F '@' <<< "$tmp" >/dev/null 2>&1; then + ssh rbousset@bastion -t -- root@"$tmp" $* + else + ssh rbousset@bastion -t -- "$tmp" $* + fi + else + ssh rbousset@bastion -t -- $* + fi +} upsrc() { doas git -C /usr/src pull --ff-only } -- cgit v1.2.3