]> gitweb.fluxo.info Git - leap/leap_cli.git/commitdiff
hackishly set the terminal title
authorelijah <elijah@riseup.net>
Tue, 11 Dec 2012 10:20:00 +0000 (02:20 -0800)
committerelijah <elijah@riseup.net>
Tue, 11 Dec 2012 10:20:00 +0000 (02:20 -0800)
lib/leap_cli/commands/shell.rb

index f73a706bd81c4438d115d5701c37289c99cf0406..f1af3e9b7509e6433022a686e936bdaac3e001d2 100644 (file)
@@ -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