delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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 |
From: | Andrew Ellerton <ellers AT iinet DOT net DOT au> |
To: | =?windows-1252?Q?Sven=20K=F6hler?= <skoehler AT upb DOT de> |
Cc: | cygwin AT cygwin DOT com |
Date: | Sun, 20 Oct 2002 21:58:14 +0800 |
X-Priority: | 3 (Normal) |
In-Reply-To: | <3DB2B34F.2050302@upb.de> |
Message-Id: | <DB883JGTOHE2YGDC92WYSRLMLWQJGP.3db2b676@milano> |
Subject: | Re: Cygwin Here power toy |
MIME-Version: | 1.0 |
>> @="c:\\cygwin\\bin\\bash.exe --login -c \"cd '%1' ; exec /bin/bash -rcfile ~/.bashrc\"" > >can you think of any better way to start bash? >the above creates two bash.exe in memory: >one executing /etc/profile and the cd-command >and one showing the prompt. The first shell executes a single line of shell commands, namely to change directory and run another shell. The second shell runs as the "normal" interactive shell. Net effect - looks like the shell has started in a different directory. Admittedly a bit hacky, having two shells running for no good reason, but it does the job. I'm not sure if shells are very expensive in terms of memory. If not, then its a bit kludgey, but otherwise its ok. >bash --login -c "command" >exits after executing the command. >is there any bash-internal command, that let's you show a prompt after >the command is executed? or any switch that forces bash to not exit? There's bound to be... anyone got any idea? I saw another posting to the list where the cd gets written to a file then the login script looks for the file and changes to that dir... that's an option. Andrew -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |