aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/leap_cli/commands/shell.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/leap_cli/commands/shell.rb b/lib/leap_cli/commands/shell.rb
index f1af3e9..5d8fc66 100644
--- a/lib/leap_cli/commands/shell.rb
+++ b/lib/leap_cli/commands/shell.rb
@@ -16,7 +16,10 @@ module LeapCli; module Commands
end
username = 'root'
# the echo sets the terminal title. it would be better to do this on the server
- exec "echo -n \"\\033]0;#{username}@#{node.domain.full}\007\" && ssh -l #{username} -p #{node.ssh.port} #{options.join(' ')} #{node.name}"
+ cmd = "ssh -l #{username} -p #{node.ssh.port} #{options.join(' ')} #{node.name}"
+ log 2, cmd
+ title = "echo -n \"\\033]0;#{username}@#{node.domain.full}\007\""
+ exec "#{title} && #{cmd}"
end
end