aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2012-12-11 02:20:00 -0800
committerelijah <elijah@riseup.net>2012-12-11 02:20:00 -0800
commit26d237a2cbd44301f2c553a2540ef41f80b85270 (patch)
treeb8fdbb2bd1b420563473d66837e1d8e10a40f7b2 /lib
parentf43b27b2e5e192a917ae0fdac34097ad0754f9bc (diff)
downloadleap_cli-26d237a2cbd44301f2c553a2540ef41f80b85270.tar.gz
leap_cli-26d237a2cbd44301f2c553a2540ef41f80b85270.tar.bz2
hackishly set the terminal title
Diffstat (limited to 'lib')
-rw-r--r--lib/leap_cli/commands/shell.rb4
1 files changed, 3 insertions, 1 deletions
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