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.
27 lines
1.0 KiB
Plaintext
27 lines
1.0 KiB
Plaintext
# To the extent possible under law, the author(s) have dedicated all
|
|
# copyright and related and neighboring rights to this software to the
|
|
# public domain worldwide. This software is distributed without any warranty.
|
|
# You should have received a copy of the CC0 Public Domain Dedication along
|
|
# with this software.
|
|
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
|
|
# /etc/bash.bashrc: executed by bash(1) for interactive shells.
|
|
|
|
# System-wide bashrc file
|
|
|
|
# Check that we haven't already been sourced.
|
|
([[ -z ${CYG_SYS_BASHRC} ]] && CYG_SYS_BASHRC="1") || return
|
|
|
|
# If not running interactively, don't do anything
|
|
[[ "$-" != *i* ]] && return
|
|
|
|
# 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)"
|