This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Bash + Shell hack = ?


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@sourceware.cygnus.com
> 
> --
> Jonathan Segal
> Principal Software Engineer/Group Leader, Bioinformatics
> Genome Therapeutics Corp.
> jonathan.segal@genomecorp.com
> (781) 398-2579
> 


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]