Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 295095 Details for
Bug 433190
colorls.sh optimizations
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Optimize noninteractive shell case, reduce amount of stat calls
colorls-noninteractive+statopt.patch (text/plain), 1.90 KB, created by
Ville Skyttä
on 2008-02-17 10:26:26 UTC
(
hide
)
Description:
Optimize noninteractive shell case, reduce amount of stat calls
Filename:
MIME Type:
Creator:
Ville Skyttä
Created:
2008-02-17 10:26:26 UTC
Size:
1.90 KB
patch
obsolete
>Index: coreutils-colorls.sh >=================================================================== >RCS file: /cvs/pkgs/rpms/coreutils/devel/coreutils-colorls.sh,v >retrieving revision 1.9 >diff -u -r1.9 coreutils-colorls.sh >--- coreutils-colorls.sh 14 Feb 2008 14:43:46 -0000 1.9 >+++ coreutils-colorls.sh 17 Feb 2008 10:22:46 -0000 >@@ -1,19 +1,33 @@ > # color-ls initialization >+ >+alias ll='ls -l' 2>/dev/null >+alias l.='ls -d .*' 2>/dev/null >+ >+# Do not override user set LS_COLORS, but use them. > if [ -z "$LS_COLORS" ]; then >- #do not override user LS_COLORS, so perform only for zero sized LS_COLORS >- alias ll='ls -l' 2>/dev/null >- alias l.='ls -d .*' 2>/dev/null >- >- COLORS=/etc/DIR_COLORS >- [ -e "/etc/DIR_COLORS.$TERM" ] && COLORS="/etc/DIR_COLORS.$TERM" >- [ -e "/etc/DIR_COLORS.256color" ] && \ >- [ "`tput colors 2>/dev/null`" == "256" ] && \ >- COLORS="/etc/DIR_COLORS.256color" >- [ -e "$HOME/.dircolors" ] && COLORS="$HOME/.dircolors" >- [ -e "$HOME/.dir_colors" ] && COLORS="$HOME/.dir_colors" >- [ -e "$HOME/.dircolors.$TERM" ] && COLORS="$HOME/.dircolors.$TERM" >- [ -e "$HOME/.dir_colors.$TERM" ] && COLORS="$HOME/.dir_colors.$TERM" >- [ -e "$COLORS" ] || return >+ >+ # Skip the rest for noninteractive shells. >+ [ -z "$PS1" ] && return >+ >+ COLORS= >+ >+ for colors in "$HOME/.dir_colors.$TERM" "$HOME/.dircolors.$TERM" \ >+ "$HOME/.dir_colors" "$HOME/.dircolors"; do >+ [ -e "$colors" ] && COLORS="$colors" && break >+ done >+ >+ [ -z "$COLORS" ] && [ -e "/etc/DIR_COLORS.256color" ] && \ >+ [ "`tput colors 2>/dev/null`" == "256" ] && \ >+ COLORS="/etc/DIR_COLORS.256color" >+ >+ if [ -z "$COLORS" ]; then >+ for colors in "/etc/DIR_COLORS.$TERM" "/etc/DIR_COLORS" ; do >+ [ -e "$colors" ] && COLORS="$colors" && break >+ done >+ fi >+ >+ # Existence of $COLORS already checked above. >+ [ -n "$COLORS" ] || return > > eval `dircolors --sh "$COLORS" 2>/dev/null` > [ -z "$LS_COLORS" ] && return
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 433190
: 295095