filesystem: New specific variable MSYS2_PS1.
Setting this variable now makes /etc/bash.bashrc use that as PS1 instead of default value. This allows for configuration shared between MSYS2 and other environments like Cygwin or MinGW.org MSYS to define a PS1 that is specific to MSYS2 without manual detection of the system type.
This commit is contained in:
@@ -43,7 +43,7 @@ source=('bash.bash_logout'
|
||||
'08-xml-catalog.post'
|
||||
'cygwin.ldif')
|
||||
sha256sums=('6d651f6b0b2d173961a3fa21acd9d44c783ed9cd73a031687698c8b9ed1f6dee'
|
||||
'b246aec17f8117b18231a94ca8b806b5e281844de402e923a9982f3622f33a43'
|
||||
'437d8e49e10aa8a5dc29bda296e21d5f8a4920d4bd193d05d58c6aab259a518e'
|
||||
'99eae6e37081edd73b399009c85f4a67a0c14481241ee4937ab45c4178b540fb'
|
||||
'ed08a8bd0919ba29ec5dd2d0c74ba74324ca2bcbf7852354b0b6c523809029a0'
|
||||
'4330edf340394d0dae50afb04ac2a621f106fe67fb634ec81c4bfb98be2a1eb5'
|
||||
|
||||
@@ -15,8 +15,12 @@
|
||||
# If not running interactively, don't do anything
|
||||
[[ "$-" != *i* ]] && return
|
||||
|
||||
# Set a default prompt of: user@host, MSYSTEM variable, and current_directory
|
||||
PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[35m\]$MSYSTEM\[\e[0m\] \[\e[33m\]\w\[\e[0m\]\n\$ '
|
||||
# If MSYS2_PS1 is set, use that as default PS1, otherwise set a default prompt
|
||||
# of user@host, MSYSTEM variable, and current_directory
|
||||
if test -n "${MSYS2_PS1}"
|
||||
then PS1="${MSYS2_PS1}"
|
||||
else PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[35m\]$MSYSTEM\[\e[0m\] \[\e[33m\]\w\[\e[0m\]\n\$ '
|
||||
fi
|
||||
|
||||
# Uncomment to use the terminal colours set in DIR_COLORS
|
||||
# eval "$(dircolors -b /etc/DIR_COLORS)"
|
||||
|
||||
Reference in New Issue
Block a user