maybe chmod 0644 'modprobe.d/i386.conf'
maybe chmod 0755 'modules-load.d'
maybe chmod 0644 'modules-load.d/.keep_sys-apps_systemd-0'
+maybe chmod 0644 'motd.tail'
maybe chmod 0644 'nanorc'
maybe chmod 0644 'networks'
maybe chmod 0644 'nsswitch.conf'
#done
# Try to keep environment pollution down, EPA loves us.
-unset use_color safe_term match_lhs
+unset safe_term match_lhs
if [ -d /usr/scripts ] ; then
export PATH="/usr/scripts:${PATH}"
. /usr/share/mc/mc.gentoo
fi
-if [ -e /etc/bash_completion.d/git ] ; then
- if [[ ${EUID} == 0 ]] ; then
- PS1='$? \[\033[01;31m\]\h\[\033[01;30m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(__git_ps1)\[\033[01;34m\] \$ \[\033[00m\]'
+GP_RC="/usr/share/bash-completion/completions/git-prompt"
+if [[ -r "${GP_RC}" ]] ; then
+ . "${GP_RC}"
+fi
+
+prompt_status() {
+ local e=$?;
+ [[ $e != 0 ]] && echo -e "$e ";
+}
+
+if ${use_color} ; then
+ if type -t __git_ps1 >/dev/null ; then
+ if [[ "$UID" = 0 ]]; then
+ PS1='\[\e[31m\]$(prompt_status)\[\033[01;31m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h \[\033[01;33m\]\w\[\033[01;31m\]$(__git_ps1)\[\033[01;35m\] \$ \[\033[00m\]'
+ else
+ PS1='\[\e[31m\]$(prompt_status)\[\033[01;32m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h \[\033[01;33m\]\w\[\033[01;31m\]$(__git_ps1)\[\033[01;35m\] > \[\033[00m\]'
+ fi
+ else
+ if [[ "$UID" = 0 ]]; then
+ PS1='\[\e[31m\]$(prompt_status)\[\033[01;31m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h \[\033[01;33m\]\w \[\033[01;35m\]\$ \[\033[00m\]'
+ else
+ PS1='\[\e[31m\]$(prompt_status)\[\033[01;32m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h \[\033[01;33m\]\w \[\033[01;35m\]> \[\033[00m\]'
+ fi
+ fi
+else
+ if type -t __git_ps1 >/dev/null ; then
+ if [[ "$UID" = 0 ]]; then
+ PS1='$(prompt_status)\u@\h \w$(__git_ps1) \$ '
+ else
+ PS1='$(prompt_status)\u@\h \w$(__git_ps1) > '
+ fi
else
- PS1='$? \[\033[01;32m\]\u@\h\[\033[01;30m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(__git_ps1)\[\033[01;34m\] > \[\033[00m\]'
+ if [[ "$UID" = 0 ]]; then
+ PS1='$(prompt_status)\u@\h \w \$ '
+ else
+ PS1='$(prompt_status)\u@\h \w > '
+ fi
fi
fi
+unset use_color
+
# vim: ts=4 expandtab