Mail Archives: cygwin/2006/01/13/17:53:25
David Rothenberger wrote:
> On 1/11/2006 9:06 PM, Eric Blake wrote:
>>> "exec -l" in bash 3.1-1 doesn't seem to start a login shell. This
>>> prevents my chere commands from starting a login shell, too.
>>
>> Have you tried "bash --login" instead?
>
> "bash --login" works fine, but the problem with "-bash" prevents chere
> from starting login shells. It may be possible to modify chere to use
> "bash --login", but this is still a bash bug, right?
chere could indeed be modified to do that. However prepending '-' is (currently)
the only method of invoking a login shell which works across all the packaged
shells.
So I went ahead and installed 3.1-1 to try it out. Here's what I found:
chere did indeed stop working as advertised. Further experiments from a command
prompt:
--- start
c:\cygwin\bin>bash
bash-3.1$ exec -l bash
d_inabox AT minime ~
$
--- end
login shell executed (PS1 evaluated). Attempting the verbatim line from chere:
--- start
c:\cygwin\bin>bash
bash-3.1$ exec -l /bin/bash
bash-3.1$
--- end
I haven't checked $0, but I'm guessing it's something like -/bin/bash, and this
isn't triggering a login shell.
chere passes the full path to the executable in case the shell isn't in the
path. I can't remember if this was absolutely necessary, but it certainly works
with the other shells. e.g
--start
c:\cygwin\bin>bash
bash-3.1$ exec -l /bin/zsh
(d_inabox AT minime)[1] ~
$
---end
Regards,
Dave
chere maintainer
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
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 -