This is the mail archive of the
mailing list for the Cygwin project.
Re: Bash + Shell hack = ?
- To: Jonathan Segal <jonathan dot segal at genomecorp dot com>
- Subject: Re: Bash + Shell hack = ?
- From: Luke Bakken <luke_bakken at yahoo dot com>
- Date: Fri, 22 Sep 2000 09:39:35 -0700 (PDT)
- cc: cygwin at sources dot redhat dot com
- Reply-To: luke_bakken at yahoo dot com
This is what I had to do with this:
c:\cygwin\bin\bash.exe -c "cd '%1';exec /usr/bin/bash --rcfile
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!!
On Fri, 22 Sep 2000, Jonathan
> 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.
> 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 firstname.lastname@example.org
> Jonathan Segal
> Principal Software Engineer/Group Leader, Bioinformatics
> Genome Therapeutics Corp.
> (781) 398-2579
Want to unsubscribe from this list?
Send a message to email@example.com