Mail Archives: cygwin/2005/03/02/18:17:03
On Wed, 2 Mar 2005, Brian Dessent wrote:
> Perhaps a cleaner solution would be to modify the stock /etc/profile to
> detect whether it is running under bash or sh, and create an appropriate
> prompt. I don't know who's maintaining the base-files package or
> whether he/she's interested in looking into this.
The stock /etc/profile already does that. However, /etc/profile is only
invoked for login shells. A regular shell invocation inherits PS1 from
the current shell. Contrast
igor AT pechtcha ~
$ /bin/sh
\[\033]0;\w\007
\033[32m\]\u@\h \[\033[33m\w\033[0m\]
$ exit
igor AT pechtcha ~
$ (exec -l /bin/sh)
alias: not found
$ exit
Note: the "alias: not found" message results from /etc/profile.d/mc.sh (as
I've reported a while ago), but it may be an ash problem. According to
<http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html>,
a POSIX-compliant shell should support the "alias" and "unalias" commands.
Igor
--
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!
"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT
--
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 -