Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

================== xterm-title-on-ssh

description

A little modofication of .bashrc script, that set tab title in gnome terminal as host that you are connecting to with ssh or telnet command.

usage

You can replace whole .bashrc file in your home directory with this one, or you can just add a few lines to the end of your .bashrc:

ssh() {
        params=$*
        title=`echo $params | egrep -oi '[0-9a-z.]*\.[0-9a-z.]*'`
        echo -en "\033]0;$title\a"
        /usr/bin/ssh $params
}
telnet() {
        params=$*
        title=`echo $params | egrep -oi '[0-9a-z.]*\.[0-9a-z.]*'`
        echo -en "\033]0;$title\a"
        /usr/bin/telnet $params
}

About

This is modified .bashrc from ubuntu, modified so thatwhen you run ssh command in console

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages