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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Daniel Santos
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 <[hidden email]>
---
 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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Achim Gratz
Daniel Santos writes:
> 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.

Wrong list.  Also, you shouldn't set any prompt in profile.d.


Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs
Loading...