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 Date: Wed, 2 Mar 2005 18:16:36 -0500 (EST) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com Subject: Re: emacs shell mode prompt with escape sequences "\[\033]0;\w\007" In-Reply-To: <4226452D.598BD3C4@dessent.net> Message-ID: References: <4226452D DOT 598BD3C4 AT dessent DOT net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 , 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/