From 1fa53ea94c453ef12f3fbf238d740f4914367d40 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Mon, 30 Mar 2020 17:37:22 +1300 Subject: [PATCH] display error if sshproxy functions get no arguments --- .zsh/zshrc/parts.d/50-ssh | 1 + 1 file changed, 1 insertion(+) diff --git a/.zsh/zshrc/parts.d/50-ssh b/.zsh/zshrc/parts.d/50-ssh index 8ece86b..0e6e62c 100644 --- a/.zsh/zshrc/parts.d/50-ssh +++ b/.zsh/zshrc/parts.d/50-ssh @@ -20,6 +20,7 @@ _ssh_proxy() { local cmd sshopts cmdopts cmd="$1"; shift sshopts="${*%%--*}"; sshopts="${sshopts%% }" + [[ -n "$sshopts" ]] || { ssh; return $? } cmdopts="${*#$sshopts}"; cmdopts="${cmdopts#*-- }" eval ssh $sshopts -t $cmd $cmdopts } -- 2.39.2