summaryrefslogtreecommitdiffstats
path: root/.config/zsh
diff options
context:
space:
mode:
authorJoe <rrbo@proton.me>2022-10-13 18:46:04 +0200
committerJoe <rrbo@proton.me>2022-10-13 18:46:04 +0200
commitfd8d1b359794cb466d5bf0540f6ba176b2e97020 (patch)
treef9a8bd4eaf947ee61580b1bf5e7a41df59737d92 /.config/zsh
parentbastioned (diff)
downloaddotfiles-bsd-fd8d1b359794cb466d5bf0540f6ba176b2e97020.tar.gz
dotfiles-bsd-fd8d1b359794cb466d5bf0540f6ba176b2e97020.tar.bz2
dotfiles-bsd-fd8d1b359794cb466d5bf0540f6ba176b2e97020.tar.xz
dotfiles-bsd-fd8d1b359794cb466d5bf0540f6ba176b2e97020.tar.zst
dotfiles-bsd-fd8d1b359794cb466d5bf0540f6ba176b2e97020.zip
perfect
Diffstat (limited to '.config/zsh')
-rw-r--r--.config/zsh/alias.zsh16
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
}