Skip to content

Commit

Permalink
Deduplicate hosts in ssh-tunnel
Browse files Browse the repository at this point in the history
The ssh-tunnel plugin prints a host every time it finds a line with DynamicForward or LocalForward. This change condenses consecutive duplicate hosts to ensure only one host is displayed in the menu, even if that host configuration has multiple forwards configured.
  • Loading branch information
MattHardcastle committed Aug 29, 2020
1 parent 6d31cc7 commit bf93671
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Network/ssh-tunnel.1s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function hosts() {
$1 == "DynamicForward" || $1 == "LocalForward" {
print host;
}
' "$1"
' "$1" | uniq
}

for h in $(hosts ~/.ssh/config); do
Expand Down

0 comments on commit bf93671

Please sign in to comment.