From 7533fdb5ed76185176291e9d4ed7c3735d7a0a17 Mon Sep 17 00:00:00 2001 From: Guillermo Ramos Date: Tue, 16 Jan 2024 13:04:39 +0100 Subject: passh / ssf: some improvements --- ssf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ssf') diff --git a/ssf b/ssf index 6df0c63..a0d64d0 100755 --- a/ssf +++ b/ssf @@ -29,7 +29,11 @@ foreach my $cfgfile (glob "$ENV{HOME}/.ssh/config.d/*") { } next unless defined $key; if ($key eq 'Host') { - @line_hosts = map { { _pat => $_ } } (split /\s/, $value); + if ($value =~ /"/) { + @line_hosts = ({ _pat => $value }); + } else { + @line_hosts = map { { _pat => $_ } } (split /\s/, $value); + } push @hosts, @line_hosts; } elsif ($key eq 'Match') { @line_hosts = (); @@ -82,5 +86,5 @@ if (exists $ENV{TMUX}) { system 'passh', $hostname, '-t', "sh -c \"tmux new -As $remote_session_name\""; `tmux rename-window '[$hostname]'`; } else { - exec 'passh', $hostname, '-t', "sh -c \"tmux new -As $remote_session_name\""; + exec 'passh', $hostname; } -- cgit v1.2.3