This is the mail archive of the cygwin-patches 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]

[PATCH] [base-files] Don't clobber prompt set in /etc/profile.d


When I build my own machine, I prefer to set my own default prompt in
/etc/profile.d.  This makes it easier on me, but still allows other
users to set whatever prompt they please.  This line in bash.bashrc
incorrectly clobbers whatever prompt is set in /etc/profile.d.

Signed-off-by: Daniel Santos <daniel.santos@pobox.com>
---
 etc/defaults/etc/bash.bashrc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/etc/defaults/etc/bash.bashrc b/etc/defaults/etc/bash.bashrc
index 0f633fa..7fc78aa 100644
--- a/etc/defaults/etc/bash.bashrc
+++ b/etc/defaults/etc/bash.bashrc
@@ -27,7 +27,7 @@
 export EXECIGNORE="*.dll"
 
 # Set a default prompt of: user@host and current_directory
-PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ '
+PS1="${PS1:-'\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ '}"
 
 # Uncomment to use the terminal colours set in DIR_COLORS
 # eval "$(dircolors -b /etc/DIR_COLORS)"
-- 
2.11.0


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