Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 May 2002 09:10:33 -0700 (PDT)
From:      Daichi GOTO <daichi@ongs.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   conf/38294: hosts variable setting bug of /usr/share/examples/tcsh/complete.tcsh
Message-ID:  <200205191610.g4JGAXtU039426@www.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         38294
>Category:       conf
>Synopsis:       hosts variable setting bug of /usr/share/examples/tcsh/complete.tcsh
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 19 09:20:02 PDT 2002
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205191610.g4JGAXtU039426>