This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Base-Files (was Re: Unset TMP/TEMP in profile?)


On 01/12/2009 21:14, Jon TURNEY wrote:
On 01/12/2009 20:17, Jon TURNEY wrote:
On 01/12/2009 19:37, John Morrison wrote:
Ok, I've removed the X11R6 from the path and unset TMP and TEMP in the
skel/.bashrc. Are there any other changes folks would like before I roll
this up?

Could you consider the changes suggested by [1] so PS1 is always set in
a login shell.

I meant to write "PS1 is always set in an interactive shell"


[1] http://sourceware.org/ml/cygwin-xfree/2009-10/msg00068.html

To summarize the referenced email: PS1 is unset by non-interactive bash shells, so setting PS1 only at login means it is not inherited by interactive shells which have a non-interactive shell in their ancestry.


Attached is a patch for base-files which attempts to fix this by moving the PS1 initialization from /etc/profile to /etc/bash.bashrc and moving the hook which runs /etc/bash.bashrc from ~/.bash_profile to ~/.bashrc.

This affects the prompt displayed in an xterm in the default configuration.

You can also demonstrate the change by comparing the behaviour of 'bash -c bash'.

Attachment: set-ps1-in-interactive-shells.patch
Description: application/itunes-itlp

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]