Bug 68697 - /etc/profile.d/colorls.csh uses TERM even if it isn't set
Summary: /etc/profile.d/colorls.csh uses TERM even if it isn't set
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: fileutils   
(Show other bugs)
Version: 1.0
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Phil Knirsch
QA Contact: Mike McLean
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 67217
TreeView+ depends on / blocked
 
Reported: 2002-07-12 16:15 UTC by Jonathan Kamens
Modified: 2015-03-05 01:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-07-15 14:36:04 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Jonathan Kamens 2002-07-12 16:15:36 UTC
In csh, you can't reference a variable that isn't set.

--- colorls.csh 2002/07/12 16:12:47     1.1
+++ colorls.csh 2002/07/12 16:14:06
@@ -1,10 +1,16 @@
 # color-ls initialization
 set COLORS=/etc/DIR_COLORS
-test -e "/etc/DIR_COLORS.$TERM" && set COLORS="/etc/DIR_COLORS.$TERM"
+if ($?TERM) then
+    test -e "/etc/DIR_COLORS.$TERM" && set COLORS="/etc/DIR_COLORS.$TERM"
+endif
 test -f ~/.dircolors && set COLORS=~/.dircolors
-test -f "~/.dircolors.$TERM" && set COLORS="~/.dircolors.$TERM"
+if ($?TERM) then
+    test -f "~/.dircolors.$TERM" && set COLORS="~/.dircolors.$TERM"
+endif
 test -f ~/.dir_colors && set COLORS=~/.dir_colors
-test -f "~/.dir_colors.$TERM" && set COLORS="~/.dir_colors.$TERM"
+if ($?TERM) then
+    test -f "~/.dir_colors.$TERM" && set COLORS="~/.dir_colors.$TERM"
+endif

 test -e "$COLORS" || exit 0

Comment 1 Phil Knirsch 2002-07-15 14:36:00 UTC
Fixing.

Read ya, Phil

Comment 2 Phil Knirsch 2002-07-15 14:47:18 UTC
OK, fixed colorls.csh included in fileutils-4.1.9-3, available at a rawhide
mirror near you real soon now. :-)

Thanks,

Read ya, Phil

Comment 3 Michael Fulbright 2002-12-20 17:38:25 UTC
Time tracking values updated


Note You need to log in before you can comment on or make changes to this bug.