delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/10/15/10:55:32

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Date: Fri, 15 Oct 2004 10:54:58 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Dave <d_inabox AT yahoo DOT com>
cc: cygwin AT cygwin DOT com, Andrew Grimm <agrimm AT redwood DOT rsc DOT raytheon DOT com>
Subject: Re: tcsh and chere-0.3-1
In-Reply-To: <20041014232612.72042.qmail@web53410.mail.yahoo.com>
Message-ID: <Pine.GSO.4.61.0410151044450.20921@slinky.cs.nyu.edu>
References: <20041014232612 DOT 72042 DOT qmail AT web53410 DOT mail DOT yahoo DOT com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.39

On Thu, 14 Oct 2004, Dave wrote:

> --- Andrew Grimm <agrimm AT XXXXXXX DOT XXX DOT XXXXXXXX DOT XXX> wrote:

<http://cygwin.com/acronyms/#PCYMTNQREAIYR>.  Thanks.

> > Igor Pechtchanski said:
> > > > Does anyone know of a way to get a `-` at the start of $0? I believe
> > > > this will force all the shells to start as login shells and is the
> > > > most generic solution.
> > >
> > > Sure.  'bash -c "exec -l $PROG $ARGS"'. :-)
> >
> > Ya beat me to it :)  Although, in the current design, this would make
> > a bash shell call a login shell call a normal shell (for the cd) which
> > is a bit of a quoting nightmare.

Not necessarily.  Have bash set the variable and 'exec' the shell -- and
then rely on the startup script to do the 'cd'...

> > You could make a support script (/bin/shere) that did somehting like
> > this:
>
> Thanks guys. My brains been turned to slush reading all the different
> shell man pages (as you may have figured from my last few emails).
>
> It turns out that on windows 2k, if you remove the cd $HOME from the
> appropriate login script, you can just `/bin/tcsh -l`. Since 2k puts you
> in the appropriate path anyway.
>
> Nice. It even works with network paths.
>
> Can anyone confirm this works on 9x, NT and XP?
>
> If it does work on all platforms, it's my preferred route. It'll still
> need:
> an env var for the startup scripts to check
> a shell script (which may be chere) to set the variable
>
> And will mean you have a spare sh for every term opened in this manner.

Umm, as I said above, you can set the variable in the bash command, and
use 'exec -l' to spawn the shell.  As long as the startup scripts have to
recognize the variable anyway, they might as well do the 'cd'... :-)

HTH,
	Igor

> Dave.
>
> i.e. comment out the cd $HOME line, run something like:
> regtool set /HKLM/Directory/shell/cygwin_tcsh/command/ "c:\cygwin\bin\rxvt -e /bin/tcsh -l"
>
> Or just edit your registry and give the menu a spin.

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing."  -- Dr. Jubal Harshaw

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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