From 26d237a2cbd44301f2c553a2540ef41f80b85270 Mon Sep 17 00:00:00 2001 From: elijah Date: Tue, 11 Dec 2012 02:20:00 -0800 Subject: hackishly set the terminal title --- lib/leap_cli/commands/shell.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/leap_cli/commands/shell.rb b/lib/leap_cli/commands/shell.rb index f73a706..f1af3e9 100644 --- a/lib/leap_cli/commands/shell.rb +++ b/lib/leap_cli/commands/shell.rb @@ -14,7 +14,9 @@ module LeapCli; module Commands if node.vagrant? options << "-i #{vagrant_ssh_key_file}" end - exec "ssh -l root -p #{node.ssh.port} #{options.join(' ')} {node.name}" + 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}" end end -- cgit v1.2.3