diff --git a/coreutils-colorls.csh b/coreutils-colorls.csh index f2138a9..38abdc7 100755 --- a/coreutils-colorls.csh +++ b/coreutils-colorls.csh @@ -1,3 +1,6 @@ +# skip everything for non-interactive shells +if (! $?prompt) exit + # color-ls initialization if ( $?USER_LS_COLORS ) then if ( "$USER_LS_COLORS" != "" ) then diff --git a/coreutils-colorls.sh b/coreutils-colorls.sh index c71e357..f1b227b 100755 --- a/coreutils-colorls.sh +++ b/coreutils-colorls.sh @@ -1,15 +1,14 @@ # color-ls initialization +# Skip all for noninteractive shells. +[ -z "$PS1" ] && return + #when USER_LS_COLORS defined do not override user LS_COLORS, but use them. if [ -z "$USER_LS_COLORS" ]; then alias ll='ls -l' 2>/dev/null alias l.='ls -d .*' 2>/dev/null - - # Skip the rest for noninteractive shells. - [ -z "$PS1" ] && return - INCLUDE= COLORS= diff --git a/coreutils.spec b/coreutils.spec index 64067bd..c318d68 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,7 +1,7 @@ Summary: A set of basic GNU tools commonly used in shell scripts Name: coreutils Version: 8.22 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv3+ Group: System Environment/Base Url: http://www.gnu.org/software/coreutils/ @@ -372,6 +372,10 @@ fi %{_sbindir}/chroot %changelog +* Mon Dec 23 2013 Ondrej Vasik 8.22-4 +- skip even the ls aliases in noninteractive mode + (suggested by T. Cordes, #988152) + * Sun Dec 22 2013 Ondrej Vasik 8.22-3 - reset buffer before copying to prevent some rare cases of invalid output in join and uniq(#1036289)