From: John Mastro <john.b.mastro@gmail.com>
To: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: term-mode doesn't recognize "set window title" instruction
Date: Tue, 22 Nov 2016 12:27:26 -0800 [thread overview]
Message-ID: <CAOj2CQRKgTHtwDBX5iURAUBWjf4F3awevRSiv7uJ8VyWCeAerw@mail.gmail.com> (raw)
In-Reply-To: <CAD3zm23OBGXkWtQEeRPfhf9CbT__0DozWnXCdHBAyYFLau6APg@mail.gmail.com>
York Zhao <gtdplatform@gmail.com> wrote:
> Any idea?
>
> On Nov 20, 2016 1:06 PM, "York Zhao" <gtdplatform@gmail.com> wrote:
>
>> Hi list,
>>
>> In my .bashrc file, I have the following to set the terminal window title
>> and customize the shell prompt:
>>
>> PS1='\[\033]0;${PWD//[^[:ascii:]]/?}\007\]' # set window title
>> PS1="$PS1"'\u@\h $ ' # user@host $<space>
>>
>> The first line makes the current directory shown as the title of the
>> terminal window, and the prompt would be shows as:
>>
>> york@linux-host $
>>
>> However, the first line which sets the terminal window title confused the
>> term-mode, and the following is what gets shown in term-mode buffer:
>>
>> 0;/home/yorkyork@linux-host $
>>
>> Of course the problem can be addressed by removing the first line in my
>> .bashrc file which sets the title of terminal window. However, I would love
>> to know if there's a way to allow the terminal window title to be shown,
>> while at the same time, also making Emacs term-mode happy!
I don't know how to make that work with term-mode, but an alternative to
outright removing that line would be to do something like:
if [ -z "$INSIDE_EMACS" ]; then
# set window title, unless inside emacs
PS1='\[\033]0;${PWD//[^[:ascii:]]/?}\007\]'
else
PS1=''
fi
PS1="$PS1"'\u@\h $ ' # user@host $<space>
Thought it was worth mentioning.
John
next prev parent reply other threads:[~2016-11-22 20:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-20 18:06 term-mode doesn't recognize "set window title" instruction York Zhao
2016-11-22 19:47 ` York Zhao
2016-11-22 20:27 ` John Mastro [this message]
2016-11-23 4:31 ` Bob Proulx
2016-11-23 5:20 ` York Zhao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAOj2CQRKgTHtwDBX5iURAUBWjf4F3awevRSiv7uJ8VyWCeAerw@mail.gmail.com \
--to=john.b.mastro@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.