Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: dragon.dn.rsc.raytheon.com: agrimm owned process doing -bs Date: Thu, 14 Oct 2004 13:13:29 -0600 (MDT) From: Andrew Grimm X-X-Sender: agrimm AT dragon To: cygwin AT cygwin DOT com cc: d_inabox AT yahoo DOT com Subject: Re: tcsh and chere-0.3-1 Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SPAM: 0.00 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. You could make a support script (/bin/shere) that did somehting like this: #!/bin/bash # shere: run login shell arg1 in directory arg2 [ -x "$1" -a -d "$2" ] || exit 1; dir=$(/bin/cygpath -u "$2") exec -l $1 -c "cd \"$dir\"; exec $1" Then the command you send would turn into something as simple as: C:\cygwin\bin\rxvt.exe -e /bin/shere /bin/tcsh.exe '%L' If you hate the idea of making another script (I do too) you could turn chere into a bash script, and add an arg like "chere -e " which runs the above. Then chere would do its work by registering a call to chere. -Andy -- 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/