Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com X-Authentication-Warning: ics-server.interface-net.com: lbakken owned process doing -bs Date: Fri, 22 Sep 2000 09:39:35 -0700 (PDT) From: Luke Bakken X-Sender: lbakken AT ics-server DOT interface-net DOT com Reply-To: luke_bakken AT yahoo DOT com To: Jonathan Segal cc: cygwin AT sources DOT redhat DOT com Subject: Re: Bash + Shell hack = ? In-Reply-To: <39CB8334.35C6BFF5@genomecorp.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII This is what I had to do with this: c:\cygwin\bin\bash.exe -c "cd '%1';exec /usr/bin/bash --rcfile /home/administrator/.bash_shell_profile" I had to create that separate rcfile since the /etc/profile file has a cd $HOME in it - i removed that from this one to keep it from cd'ing to /home/administrator every time, and I can still start up bash the normal way (ie the Cygwin icon) and be taken to my home dir. Thanks for the suggestion - it steered me in the right way!! Luke On Fri, 22 Sep 2000, Jonathan Segal wrote: > Neat idea! > > To do this with bash, try something like > > d:\cygwin\bin\bash.exe -c "cd %1; exec /usr/bin/bash -i" > > replace d:\cygwin\bin with wherever bash is on your system. > > Enjoy, > -Jonathan > > Luke Bakken wrote: > > > Hi, > > > > I've got an option for my "File Folder" file type so that if I right-click > > on a folder, I can execute a cmd.exe prompt in that folder: > > > > cmd.exe /K cd "%1" > > > > What I'm wondering is if something analogous to the /K switch exists for > > Bash, so that I can run a command before starting the login shell. the > > "-c" option is similar, but the shell exits after running the command > > specified. What I want is for it not to exit. > > > > Thanks, > > Luke > > > > -- > > Want to unsubscribe from this list? > > Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com > > -- > Jonathan Segal > Principal Software Engineer/Group Leader, Bioinformatics > Genome Therapeutics Corp. > jonathan DOT segal AT genomecorp DOT com > (781) 398-2579 > -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com