On Wed, Mar 25, 2009 at 12:45 PM, Chris Henderson <henders...@gmail.com> wrote:
> On Tue, Mar 24, 2009 at 9:27 PM, Aaron Davies <aaron.dav...@gmail.com> 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.

oops, that should have been &&

anyway, where you currently have

ssh() { screen -t "${1...@}" ssh "$@"; }

just make it

[ "$STY" ] && ssh() { screen -t "${1...@}" ssh "$@"; }

this translates as "if the STY environment variable is non-empty,
create the following function"

STY is an environment variable created by screen containing the
current session name, and is only set when you're inside screen
-- 
Aaron Davies
aaron.dav...@gmail.com


_______________________________________________
screen-users mailing list
screen-users@gnu.org
http://lists.gnu.org/mailman/listinfo/screen-users

Reply via email to