X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 	tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <20090909173059.GA5804@KCJs-Computer>
References: <E0529A8FFC2C9143A5F1BB9A89101D060688426B@BD01MSXMB018.US.Cingular.Net> 	 <20090909173059.GA5804@KCJs-Computer>
Date: Wed, 9 Sep 2009 13:41:30 -0400
Message-ID: <f60fe000909091041y4efc004ap50976832195f19bc@mail.gmail.com>
Subject: Re: How to run bash in rxvt with both login shell and in a specific  	directory?
From: "Mark J. Reed" <markjreed@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Wed, Sep 9, 2009 at 1:31 PM, Gary Johnson wrote:
> =C2=A0 =C2=A0C:\cygwin\bin\rxvt.exe -e /bin/bash --login -c "cd /usr/loca=
l/src; exec bash -i"

A good solution, but it won't work if you do anything in .bash_profile
that's not inherited by child shell processes (aliases, shell
functions, etc), since .bash_profile won't be executed by the bash -i.

Of course, it's not good practice to do such things in .bash_profile;
better to put them in .bashrc (and have .bash_profile source .bashrc
so they happen in login shells, too)... but something to watch out
for.

--=20
Mark J. Reed <markjreed@gmail.com>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

