delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/03/02/17:55:57

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <4226452D.598BD3C4@dessent.net>
Date: Wed, 02 Mar 2005 14:58:53 -0800
From: Brian Dessent <brian AT dessent DOT net>
Organization: My own little world...
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: emacs shell mode prompt with escape sequences "\[\033]0;\w\007"
References: <loom DOT 20050302T194426-703 AT post DOT gmane DOT org>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com

Kelly Felkins wrote:

> At the risk of exposing my ignorance of shell initialization, I'm not sure how
> best to fix this.
> 
> First, I think the issue is that the emacs shell does not know how to interpret
> these sequences. Can emacs be configured to correct this?

I think that it's a sh-vs-bash thing.  sh does not know how to handle
the escape sequences, but bash does.  So any interactive shell started
as /bin/sh will display them.  For example, if you just type "rxvt &"
you will get them because rxvt invokes /bin/sh if you don't tell it
otherwise.

The solution is probably just to tell emacs to create a shell by obeying
$SHELL (which should be /bin/bash) and not by calling /bin/sh.  I know
nothing about emacs though.

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.

Brian

--
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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019