From owner-freebsd-hackers Mon Aug 30 17: 2:59 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from dt010nb9.san.rr.com (dt010nb9.san.rr.com [204.210.12.185]) by hub.freebsd.org (Postfix) with ESMTP id B817A1538C; Mon, 30 Aug 1999 17:02:54 -0700 (PDT) (envelope-from Doug@gorean.org) Received: from localhost (doug@localhost) by dt010nb9.san.rr.com (8.9.3/8.8.8) with ESMTP id RAA11122; Mon, 30 Aug 1999 17:02:08 -0700 (PDT) (envelope-from Doug@gorean.org) Date: Mon, 30 Aug 1999 17:02:08 -0700 (PDT) From: Doug X-Sender: doug@dt010nb9.san.rr.com To: "David O'Brien" Cc: Sheldon Hearn , freebsd-hackers@FreeBSD.ORG Subject: Re: Please review: rc file changes In-Reply-To: <19990830164313.A16153@relay.nuxi.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 30 Aug 1999, David O'Brien wrote: > > I've had a week-end away from a keyboard to think about this. The only > > reason we have to use case statements for case-insensitive variable > > testing is because sh(1) doesn't offer any upper/lower case handling > > Also so that common settings can be added. Besides "yes" and "no" there > could be other forms of wanting and not wanting. I'm all but done with the rc* files and moving on to the other places in /etc that use test currently. There are 6 states that take 99% of the cases into account: yes no !yes !no presence-of-a-variable absence-of-a-variable Frankly, I'm not sure what the proposed functions get us. Current tools take all of those possible conditions into account, and adding custom hacks for common cases will increase the likelihood of people writing extremely non-portable scripts with them. Maybe I'm missing something though... Also, keep in mind that it's not just case sensitivity that we're working with here. It's also the fact that case is a sh builtin, as opposed to test which is not. If you want to see what I've got so far check out http://gorean.org/rcfiles/ Doug -- "My mama told me, my mama said, 'don't cry.' She said, 'you're too young a man to have as many women you got.' I looked at my mother dear and didn't even crack a smile. I said, 'If women kill me, I don't mind dyin!'" - John Belushi as "Joliet" Jake Blues, "I Don't Know" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message