skip even the ls aliases in noninteractive mode (suggested by T. Cordes, #988152)

This commit is contained in:
Ondřej Vašík 2013-12-23 10:50:56 +01:00
parent 94edc2ddc8
commit 7a1c1f8975
3 changed files with 11 additions and 5 deletions

View File

@ -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

View File

@ -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=

View File

@ -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 <ovasik@redhat.com> 8.22-4
- skip even the ls aliases in noninteractive mode
(suggested by T. Cordes, #988152)
* Sun Dec 22 2013 Ondrej Vasik <ovasik@redhat.com> 8.22-3
- reset buffer before copying to prevent some rare cases of
invalid output in join and uniq(#1036289)