diff options
author | Joe <rrbo@proton.me> | 2022-10-13 18:46:04 +0200 |
---|---|---|
committer | Joe <rrbo@proton.me> | 2022-10-13 18:46:04 +0200 |
commit | fd8d1b359794cb466d5bf0540f6ba176b2e97020 (patch) | |
tree | f9a8bd4eaf947ee61580b1bf5e7a41df59737d92 | |
parent | bastioned (diff) | |
download | dotfiles-bsd-fd8d1b359794cb466d5bf0540f6ba176b2e97020.tar.gz dotfiles-bsd-fd8d1b359794cb466d5bf0540f6ba176b2e97020.tar.bz2 dotfiles-bsd-fd8d1b359794cb466d5bf0540f6ba176b2e97020.tar.xz dotfiles-bsd-fd8d1b359794cb466d5bf0540f6ba176b2e97020.tar.zst dotfiles-bsd-fd8d1b359794cb466d5bf0540f6ba176b2e97020.zip |
perfect
-rw-r--r-- | .config/zsh/alias.zsh | 16 |
1 files changed, 14 insertions, 2 deletions
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 } |