Re: ssh and bash

2009-03-24 Thread Joe Zbiciak
I believe he means something like this: ssh () { if [ -z "$STY" ] ; then put_what_to_do_outside_screen_part_here else put_what_to_do_inside_screen_part_here fi } You can also use || or && operators to make it more condensed, although it's less readable. -- We sel

Re: ssh and bash

2009-03-24 Thread Aaron Davies
On Wed, Mar 25, 2009 at 12:45 PM, Chris Henderson wrote: > On Tue, Mar 24, 2009 at 9:27 PM, Aaron Davies wrote: >> for 3, condition the creation of the function on your being in screen >> ([ "$STY" ] || ...) > > Thanks. Could you please elaborate this a bit? I'm not quite sure what > I need to pu

Re: ssh and bash

2009-03-24 Thread Chris Henderson
On Tue, Mar 24, 2009 at 9:27 PM, Aaron Davies wrote: > for 3, condition the creation of the function on your being in screen > ([ "$STY" ] || ...) Thanks. Could you please elaborate this a bit? I'm not quite sure what I need to put in .bashrc. ___ scr

Re: ssh and bash

2009-03-24 Thread Aaron Davies
On Wed, Mar 25, 2009 at 12:17 PM, Chris Henderson wrote: > In my .bashrc I have ssh() { screen -t "${1...@}" ssh "$@"; } - this > opens a new screen window when I type "ssh server" from inside screen. > But if I try to ssh to any server from outside of screen, my bash gets > stuck and nothing happ

ssh and bash

2009-03-24 Thread Chris Henderson
In my .bashrc I have ssh() { screen -t "${1...@}" ssh "$@"; } - this opens a new screen window when I type "ssh server" from inside screen. But if I try to ssh to any server from outside of screen, my bash gets stuck and nothing happens. Does anyone know how to get rid of this issue? Thanks. __