www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/09/09/13:41:47

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: <E0529A8FFC2C9143A5F1BB9A89101D060688426B AT BD01MSXMB018 DOT US DOT Cingular DOT Net> <20090909173059 DOT GA5804 AT 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 AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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 <markjreed AT gmail DOT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019