This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
[PATCH] [base-files] Don't clobber prompt set in /etc/profile.d
- From: Daniel Santos <daniel dot santos at pobox dot com>
- To: cygwin-patches at cygwin dot com
- Cc: Daniel Santos <daniel dot santos at pobox dot com>
- Date: Fri, 17 Mar 2017 12:44:09 -0500
- Subject: [PATCH] [base-files] Don't clobber prompt set in /etc/profile.d
- Authentication-results: sourceware.org; auth=none
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