X-Recipient: archive-cygwin AT delorie DOT 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: <20090909173059 DOT GA5804 AT KCJs-Computer> Date: Wed, 9 Sep 2009 13:41:30 -0400 Message-ID: Subject: Re: How to run bash in rxvt with both login shell and in a specific directory? From: "Mark J. Reed" To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT 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 -- 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