[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: You said the J word



Paul Haahr bubbles:
> suggestions, folks?  a globber that uses grep(1) expressions rather than  
> shell globbing?

Very useful on occasion, but grep uses '\' to quote, and we get the "more than
one way of quoting" bogieman.

> dwimming/spelling correction in the globber?

I've always hated and liked the way that under xenix you can do:
$ ls -F h*
hello/
$ cd helo
cd hello
$ pwd
/tmp/hello

But I would hate:
$ grep jeremy /etc/passwd > helo
grep jeremy /etc/passwd > hello

The xenix shell thing only works on 'cd', which is reasonable since you
can only 'cd' to things that exist, but as a general globber thing it
would be very irritating. You'd have to quote everything that might be
similar to something already there.

I realize it wasn't a very serious suggestion, but I just want to make sure
noone takes it that way.

>  is this useful  
> enough that we should drop everything and add a globber hook now?

Changing the globber all over the place could make it *very* difficult to
write scripts.  But of course "powerful tools are lethally sharp".

	J

-- 
jeremy@sw.oz.au ph:+61 2 698 2322-x122 fax:+61 2 699 9174
I have, however, taken liberties with the barber pole.