X-Spam-Check-By: sourceware.org Date: Tue, 22 Nov 2005 15:13:32 -0500 (EST) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: Robert Body cc: cygwin AT cygwin DOT com Subject: Re: escape codes for ksh in /etc/profile ... was Re: mkpasswd, mkgroup - initial In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: 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 On Tue, 22 Nov 2005, Robert Body wrote: > I don't suppose there is a way of NOT letting %HOME% take priority over > "/etc/passwd" for my home directory? Yes. Edit /Cygwin.bat and add "unset HOME" right before invoking bash. > Brian,since you know about so many things, how come the following ksh > doesn't work in > 1) Linux xyz 2.4.7-10 #1 Thu Sep 6 17:27:27 EDT 2001 i686 unknown > 2) HP-UX xyz B.11.00 U 9000/785 2004606272 unlimited-user license > > the PS1 line below puts path into the title of the xterm, and puts > "$PWD" into prompt and this works fine in bash (different section of > /etc/profile), but not in ksh bash uses a different set of escape codes. The below is actually a bug in the default /etc/profile -- the '^[' symbols should be literal Esc (0x1B) characters, and '^G' should be 0x07 characters. I've reported this before, but it probably is time to bring it up again. > ---------taken from cygwin's /etc/profile-------------------- > ... > ksh* | -ksh* | */ksh* | \ > ksh*.exe | -ksh*.exe | */ksh*.exe ) > # Set a HOSTNAME variable > typeset -l HOSTNAME > > # Set a default prompt of: user AT host and current_directory > PS1='^[]0;${PWD}^G > ^[[32m${USER}@${HOSTNAME} ^[[33m${PWD}^[[0m > $ ' > ------------------------------------------------------------- > Basically the escape codes are being ignored in ksh, Those aren't escape codes, those are improperly pasted control characters. > but it came from cygwin's /etc/profile so it must be perfect right? :-) HTH, 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! If there's any real truth it's that the entire multidimensional infinity of the Universe is almost certainly being run by a bunch of maniacs. /DA -- 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/