diff options
author | elijah <elijah@riseup.net> | 2012-12-11 02:20:00 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2012-12-11 02:20:00 -0800 |
commit | 26d237a2cbd44301f2c553a2540ef41f80b85270 (patch) | |
tree | b8fdbb2bd1b420563473d66837e1d8e10a40f7b2 /lib | |
parent | f43b27b2e5e192a917ae0fdac34097ad0754f9bc (diff) | |
download | leap_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.rb | 4 |
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 |