From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from newton.hartwick.edu ([147.205.85.10]) by hawkwind.utcs.utoronto.ca with SMTP id <24789>; Thu, 9 Dec 1999 16:22:17 -0500 Received: from c26469-a.clnvl1.ct.home.com (147.205.108.160 [147.205.108.160]) by newton.hartwick.edu with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2448.0) id X52J4QC7; Thu, 9 Dec 1999 09:21:05 -0500 Received: by c26469-a.clnvl1.ct.home.com (sSMTP sendmail emulation); Thu, 9 Dec 1999 09:20:32 -0500 Date: Thu, 9 Dec 1999 09:20:32 -0500 From: Decklin Foster To: rc@hawkwind.utcs.toronto.edu Subject: Re: tilde featuritis alert Message-ID: <19991209092032.A2018@debian> References: <19991209025205.B305@debian> <4.2.2.19991209092255.00ae2380@mailhost.ocegr.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0i In-Reply-To: <4.2.2.19991209092255.00ae2380@mailhost.ocegr.fr>; from vons@ocegr.fr on Thu, Dec 09, 1999 at 03:52:35AM -0500 Gert-Jan Vons writes: > Something like "if (~ a b || ~ c d)" becomes quite messy when you > only have 'switch'. Ah, true. > I doubt you will see tilde expansion in rc anytime soon, since it > doesn't go with the philosophy behind the shell (just look at the > debates over 'echo' being built-in or not). Yeah, i read up on the archives and I see what you mean; I don't agree with the idea that tilde expansion makes rc more bloated or somehow doesn't 'belong' in a shell (computers are supposed to work for us, not the other way around, no?) I was just hoping that perhaps someone else who was bothered by this had already done the work of writing a patch. > I've been thinking and discussing a bit with other rc/vrl users > about adding ~ expansion to the vrl command-line editor, but it > ain't that simple since there's no easy way to know whether the user > wants the ~ to be the ~ operator or not. I bet i can get readline to do this before passing the command to rc, now that I think of this. After all, it *does* come from the people who brought you (ick) Emacs. ;-) > Something that I still haven't gotten used to even after 5-6 years > of using rc is the need to quote command arguments if there's an > equal sign like in "dd 'if=infile' 'of=outfile'". It seems to me that a simple rule would suffice here. An '=' in the first word of a command is interpreted as a metacharacter. An '=' in the rest of it is not. Oh, but there is the issue of 'foo = bar' (I find myself trying to do that frequently in sh now.) OK, an unquoted '=' is a metacharacter iff (it's part of the first word || it's the first character in the second word). That should continue to allow 'foo =bar' as well. Does lex/yacc let us do this? I'm not much of an expert there. -- Decklin Written with Debian GNU/Linux - http://www.debian.org/