On Tue, Feb 24, 2009 at 5:50 AM, Andy Harrison <aharri...@gmail.com> wrote: > On Tue, Feb 24, 2009 at 12:43 AM, Chris Henderson <henders...@gmail.com> > wrote: >> When I SSH to a server, I would like screen to open that SSH >> connection in a new window and (re)name that window as that server's >> name. I have seen this done somewhere before using hardstatus but I >> don't have that config. > > > Here's how I prefer to do it. I use ^A e to turn on the caption line, > ^A E to shut it off. > > > windowlist string "(%3n) %{..g}[%{..Y}%t%{..g}]%{..g}%=%f" > windowlist title "Num Name" > bind E caption splitonly "%{= Bw} (%2n) %{..g}[%{..Y}%t%{..g}] %{> h}" > bind e caption always "%{= Bw} (%2n) %{..g}[%{..Y}%t%{..g}] %{> h}" > > > Then I have a menu script that essentially does things like this: > > screen -t foo.example.com ssh foo.example.com
Thanks. I have put the following in my .bashrc and it's giving me exactly what I want. ssh() { screen -t "${1...@}" ssh "$@"; } BTW, I have ~/.ssh/config file setup with ssh keys and all the options I need so in the (bash) prompt all I do is type: ssh <servername> and I get a new screen window with <servername> as the title. Out of curiosity: would anyone know what these "${1...@}" ssh "$@"; means? Thanks again. _______________________________________________ screen-users mailing list screen-users@gnu.org http://lists.gnu.org/mailman/listinfo/screen-users