aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Shelton <stuart@shelton.me>2016-11-24 02:18:44 +0000
committerStuart Shelton <stuart@shelton.me>2016-11-24 02:18:44 +0000
commitf17c73440ab01d68f1ee25d2a41f322434d1b67e (patch)
tree013928d57110a63f7fcf80d81400db523b4a2554 /app-shells
parentUpdate sys-devel/gcc-4.9.4 (diff)
downloadsrcshelton-f17c73440ab01d68f1ee25d2a41f322434d1b67e.tar.gz
srcshelton-f17c73440ab01d68f1ee25d2a41f322434d1b67e.tar.bz2
srcshelton-f17c73440ab01d68f1ee25d2a41f322434d1b67e.zip
Update files which haven't been tracking upstream
Diffstat (limited to 'app-shells')
-rw-r--r--app-shells/bash/Manifest2
-rw-r--r--app-shells/bash/files/bashrc59
2 files changed, 33 insertions, 28 deletions
diff --git a/app-shells/bash/Manifest b/app-shells/bash/Manifest
index e4feeed7..1b3bb1a0 100644
--- a/app-shells/bash/Manifest
+++ b/app-shells/bash/Manifest
@@ -19,7 +19,7 @@ AUX bash-4.3-prompt-string-comsub.patch 3395 SHA256 33eeb827efffcac9362359b49c65
AUX bash-4.3-protos.patch 174 SHA256 729aded4f907f4bad466785eed850b2b25a145e9ed75f0fc690190d5fccd387a SHA512 4af0540467bbcf7cf041de6fe6ed080b149a2ff309e5dbe5e7b76bb30459aaeead813be678384feb01a7b64d3a649372f8a8aaf686f69ac7958baa87b25340b0 WHIRLPOOL b1a5def9952b1f8ec4b9c3ff9df09672b2ad55a67a99890bc0796c87e23c1ec86c0eed50125d790120b6eea595f5aeabf981383323aac43b2f790587ec70685a
AUX bash-4.3-signal.h.patch 210 SHA256 3301f5849483135d93ec5e5f9e8256e094cf17762c5dab91167f253b1a23871e SHA512 9f8756740c35434c8150f97d91ef65109def9c80bc3f0c251f7561af49a504b240395ae8a8517ffcabce599c3203b5e23effbc6bd008cd1d9f80a4cdaf638284 WHIRLPOOL 329c3fc0fbf535bb7cdfe3ac60a418734c9aa03b8ce89fb065fbdd24c6a1aae33a4156e870fbe1272df9581a166c219d93c10c74db2c319985bc8e78b89778ec
AUX bash_logout 205 SHA256 15aaded954389c05d7de5d36c4887db61975ad52c87ad78baf1062ec8997289d SHA512 7234250c03fc920996a381f9daef9e2d8ab1e1a29acdebed6669d8e0fe1c872a7fa343adf7d9ddc81225b0cd9eb223ba7ad1ff42448aff057fc6d6baa8f04a7d WHIRLPOOL 16242c8796af44f550f2935b37c770c022754c63db75b57fbe49d1a313b8651235619ead571cd70ae37f890c694d1c6b2e4871ec51345743eff8649782d0523b
-AUX bashrc 3589 SHA256 b6b499191eb2f6dfe56bc09d8cfb15054b7f2db01b07afd4118c91361e390229 SHA512 ce6c9f9b6d514518aef1402b3786cb625b2fa26c426afe7959e310f5e8b6211546f1f28b088e7fd90cbdbf8ae3dfb9e4369b75fc42af00ea5c42faebd0423d23 WHIRLPOOL 6a21008c5d949e40a82e6cfd2fb7965ab4e58904fecfa0fca91b65caa3794e189e545ae1d1d6eaa2f3edeb6b8f5a4d0416bce0c371fc2c4f4acb388f9986fca5
+AUX bashrc 3637 SHA256 cd1e64f5b48348e1960fe68fd7dc3716cd12a9ae3a9dd24cb75ccb17cd8300c4 SHA512 bac4c6ba06441e50f1303bbb9549aded2af72731fc0d1f935ec716104e0442e36f9afe28fe29c86f159d0cdfe9f1ba7dc2f42cee4265a1869e879853f531ea06 WHIRLPOOL 970741fa3438bc75d0fca1d9449b3afc51e087420de745b64073d6f1844dc73d6c0c2ad6b2575000fd3d0a7f5d6f9b9e834287ec8c4de79ebdea5b644ba82c0f
AUX bashrc-prefix.patch 1246 SHA256 2c45e5c0e3848b9da036affe25104c03e594d0ea4f298e8ca0b26912c94ea453 SHA512 c90d575d28dfae75f97b044bc44d8f9e2e5e252a593663ee0aa669a933f3b61aece44d2a61f251af5a02823df3af1591cd203f74acfcfa1819f8ae09bd10a236 WHIRLPOOL 4eb9bcfd3d96ceb24196eb927eb795fe474e698c0927db21402ac7a34d58d24606f2d016b351930435f9e4866a72ac7a3432612614d1c60bd2797701c343a2c9
AUX bashrc-prefix.patch.old 1502 SHA256 004ae7a51b0fc73d79658a707af0889b9fadaf41e0181ae4e24e2e0e504ff0d0 SHA512 f09f7f587709fc8624141c2d4576a150787bd27fbc64c12126cdb1d4f346ef4d5ab5c2a6c3f16ed4ece385a9f9e0341066563ac6d027bb08d005dce2c523d2f7 WHIRLPOOL 1ed21b8bc78811423354cdcbefd7538d4e2060e89a88044b54f8aebd3c491c6119ea7039587853399136f02ee50946be329e95f19aff84c36e1c12399b3fd378
AUX bashrc.old 3754 SHA256 5427e3e082ec835e859d9469cf8fe9e2e4b11c1dfce877b9d6a681451c14c507 SHA512 cb30d5b3771d2aeed476102033d6d6348ec7e77e7d6ad6778417e29a662e00c130d338b781cfcf7a747d437757ca8629645d1dff92116bb0709152f9cc30829d WHIRLPOOL a28aaacf65d744b1f880f7e3fa9c270551af863fc979ffddd88d76309102f03b7a484b2589ab4f7db3a0d4ec40449d7d0e55dd915d9fc8376ed940ab9cceae15
diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc
index d0da0e33..4d97059e 100644
--- a/app-shells/bash/files/bashrc
+++ b/app-shells/bash/files/bashrc
@@ -38,7 +38,7 @@ shopt -s histappend
# Change the window title of X terminals
case ${TERM} in
- xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*)
+ [aEkx]term*|rxvt*|gnome*|konsole*|interix)
PS1='\[\033]0;\u@\h:\w\007\]'
;;
screen*)
@@ -49,37 +49,42 @@ case ${TERM} in
;;
esac
-use_color=false
-#BSD#@# BSD doesn't typically come with dircolors so we need
-#BSD#@# to hardcode some terminals in here.
-#BSD#@case ${TERM} in
-#BSD#@ xterm*|rxvt*|Eterm|aterm|kterm|gnome*|screen|cons25) use_color=true;;
-#BSD#@esac
-
# Set colorful PS1 only on colorful terminals.
# dircolors --print-database uses its own built-in database
# instead of using /etc/DIR_COLORS. Try to use the external file
-# first to take advantage of user additions. Use internal bash
-# globbing instead of external grep binary.
-safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM
-match_lhs=""
-[[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)"
-[[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(</etc/DIR_COLORS)"
-[[ -z ${match_lhs} ]] \
- && type -P dircolors >/dev/null \
- && match_lhs=$(dircolors --print-database)
-[[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true
-
-if ${use_color} ; then
+# first to take advantage of user additions.
+# We run dircolors directly due to its changes in file syntax and
+# terminal name patching.
+use_color=false
+if type -P dircolors >/dev/null ; then
# Enable colors for ls, etc. Prefer ~/.dir_colors #64489
- if type -P dircolors >/dev/null ; then
- if [[ -f ~/.dir_colors ]] ; then
- eval $(dircolors -b ~/.dir_colors)
- elif [[ -f /etc/DIR_COLORS ]] ; then
- eval $(dircolors -b /etc/DIR_COLORS)
- fi
+ LS_COLORS=''
+ if [[ -f ~/.dir_colors ]] ; then
+ eval "$(dircolors -b ~/.dir_colors)"
+ elif [[ -f /etc/DIR_COLORS ]] ; then
+ eval "$(dircolors -b /etc/DIR_COLORS)"
+ else
+ eval "$(dircolors -b)"
fi
+ # Note: We always evaluate the LS_COLORS setting even when it's the
+ # default. If it isn't set, then `ls` will only colorize by default
+ # based on file attributes and ignore extensions (even the compiled
+ # in defaults of dircolors). #583814
+ if [[ -n ${LS_COLORS:+set} ]] ; then
+ use_color=true
+ else
+ # Delete it if it's empty as it's useless in that case.
+ unset LS_COLORS
+ fi
+else
+ # Some systems (e.g. BSD & embedded) don't typically come with
+ # dircolors so we need to hardcode some terminals in here.
+ case ${TERM} in
+ [aEkx]term*|rxvt*|gnome*|konsole*|screen|cons25|*color) use_color=true;;
+ esac
+fi
+if ${use_color} ; then
if [[ ${EUID} == 0 ]] ; then
PS1+='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
else
@@ -105,4 +110,4 @@ for sh in /etc/bash/bashrc.d/* ; do
done
# Try to keep environment pollution down, EPA loves us.
-unset use_color safe_term match_lhs sh
+unset use_color sh