From nobody@www.freebsd.org  Sun May 19 09:10:43 2002
Return-Path: <nobody@www.freebsd.org>
Received: from nwww.freebsd.org (www.FreeBSD.org [216.136.204.117])
	by hub.freebsd.org (Postfix) with ESMTP id 0060637B40E
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 19 May 2002 09:10:42 -0700 (PDT)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by nwww.freebsd.org (8.12.2/8.12.2) with ESMTP id g4JGAXhG039427
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 19 May 2002 09:10:33 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.2/8.12.2/Submit) id g4JGAXtU039426;
	Sun, 19 May 2002 09:10:33 -0700 (PDT)
Message-Id: <200205191610.g4JGAXtU039426@www.freebsd.org>
Date: Sun, 19 May 2002 09:10:33 -0700 (PDT)
From: Daichi GOTO <daichi@ongs.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: hosts variable setting bug of /usr/share/examples/tcsh/complete.tcsh
X-Send-Pr-Version: www-1.0

>Number:         38294
>Category:       conf
>Synopsis:       hosts variable setting bug of /usr/share/examples/tcsh/complete.tcsh
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mp
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 19 09:20:02 PDT 2002
>Closed-Date:    Sat Aug 10 11:21:20 PDT 2002
>Last-Modified:  Sat Aug 10 11:21:20 PDT 2002
>Originator:     Daichi GOTO
>Release:        FreeBSD 4.6-Prerelease
>Organization:
ONGS Inc.
>Environment:
FreeBSD parancell.ongs.co.jp 4.6-PRERELEASE-20020511-JPSNAP FreeBSD 4.6-PRERELEASE-20020511-JPSNAP #1: Wed May 15 04:04:16 JST 2002     root@bigchicken.ongs.net:/usr/src/sys/compile/BIGCHICKEN  i386

>Description:
Tcsh enhancement configuration file
/usr/share/examples/tcsh/complete.tcsh
has a bug about hosts variable setting.
It overrides hosts variable and does not treat
comment out line('#' line).
>How-To-Repeat:
% set hosts = ( aaa.bbb.ccc ddd.eee.fff )
% source /usr/share/examples/tcsh/complete.tcsh
% echo $hosts
# # #localhost #my_very_good_friend.domain
% 
>Fix:
--- /usr/share/examples/tcsh/complete.tcsh.orig	Mon May 20 00:54:31 2002
+++ /usr/share/examples/tcsh/complete.tcsh	Mon May 20 00:59:59 2002
@@ -21,10 +21,10 @@
 
 if ($?_complete) then
     set noglob
-    set hosts
+    if ( ! ${?hosts} ) set hosts
     foreach f ($HOME/.hosts /usr/local/etc/csh.hosts $HOME/.rhosts /etc/hosts.equiv)
         if ( -r $f ) then
-	    set hosts = ($hosts `grep -v "+" $f | tr -s " " "	" | cut -f 1`)
+	    set hosts = ($hosts `grep -v "+" $f | grep -E -v "^#" | tr -s " " "	" | cut -f 1`)
 	endif
     end
     if ( -r $HOME/.netrc ) then

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->mp 
Responsible-Changed-By: mp 
Responsible-Changed-When: Sun Jul 7 09:24:14 PDT 2002 
Responsible-Changed-Why:  
I submitted this to the tcsh maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=38294 
State-Changed-From-To: open->closed 
State-Changed-By: mp 
State-Changed-When: Sat Aug 10 11:21:03 PDT 2002 
State-Changed-Why:  
Fixed in tcsh-6.12.00. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=38294 
>Unformatted:
