[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ssh and bash

From: Aaron Davies
Subject: Re: ssh and bash
Date: Wed, 25 Mar 2009 12:59:08 +0800

On Wed, Mar 25, 2009 at 12:45 PM, Chris Henderson <address@hidden> wrote:
> On Tue, Mar 24, 2009 at 9:27 PM, Aaron Davies <address@hidden> 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 "address@hidden" ssh "$@"; }

just make it

[ "$STY" ] && ssh() { screen -t "address@hidden" 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]