Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 423724 Details for
Bug 572582
app-shells/bash: Color detection in /etc/bash/bashrc broken by sys-apps/coreutils-8.25
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to fix color detection
bashrc_color_detection.patch (text/plain), 2.19 KB, created by
Bernd Feige
on 2016-01-23 20:39:12 UTC
(
hide
)
Description:
Patch to fix color detection
Filename:
MIME Type:
Creator:
Bernd Feige
Created:
2016-01-23 20:39:12 UTC
Size:
2.19 KB
patch
obsolete
>=== modified file 'bash/bashrc' >--- bash/bashrc 2015-02-25 20:11:14 +0000 >+++ bash/bashrc 2016-01-23 20:28:00 +0000 >@@ -31,7 +31,10 @@ > # This does mean sessions get interleaved when reading later on, but this > # way the history is always up to date. History is not synced across live > # sessions though; that is what `history -n` does. >-PROMPT_COMMAND='history -a' >+# Disabled by default due to concerns related to system recovery when $HOME >+# is under duress, or lives somewhere flaky (like NFS). Constantly syncing >+# the history will halt the shell prompt until it's finished. >+#PROMPT_COMMAND='history -a' > > # Change the window title of X terminals > case ${TERM} in >@@ -51,27 +54,19 @@ > # 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 >+# first to take advantage of user additions. >+if type -P dircolors >/dev/null ; then >+ LS_COLORS="" >+ if [[ -f ~/.dir_colors ]] ; then >+ eval $(dircolors -b ~/.dir_colors) >+ elif [[ -f /etc/DIR_COLORS ]] ; then >+ eval $(dircolors -b /etc/DIR_COLORS) >+ fi >+ [[ -n "$LS_COLORS" ]] && use_color=true >+fi >+ > > if ${use_color} ; 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 >- fi >- > if [[ ${EUID} == 0 ]] ; then > PS1+='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] ' > else >@@ -96,7 +91,7 @@ > done > > # Try to keep environment pollution down, EPA loves us. >-unset use_color safe_term match_lhs sh >+unset use_color sh > > # Own additions: > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 572582
:
423578
|
423580
|
423724
|
423726
|
424454
|
424486
|
424490
|
424510