Newsgroups: comp.os.misc Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!lavaca.uh.edu!menudo.uh.edu!nuchat!sugar!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Subject: Re: Globbing Message-ID: <5SAA1G5@xds13.ferranti.com> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Organization: Xenix Support, FICC References: Date: Wed, 27 Mar 91 19:46:06 GMT In article kenw@skyler.arc.ab.ca (Ken Wallewein) writes: > + echo 'You continue a line\ > - by escaping it with a backslash' > You continue a line > by escaping it with a backslash > Good -- except how to continue without including newline? + echo Unquoted newlines\ - are simply whitespace. Unquoted newlines are simply whitespace. > Here's a > suggestion: allow escaping _anything_. It bugs me that csh doesn't respect > escaping quotes or spaces. % ls a\ b a b: No such file or directory % echo \"\' "' I'm not sure this is a good idea, as it does combine two mechanisms. I'd rather avoid conflicts between quoting and escaping. > + echo 'I''m planning on doing globbing like so: [*.c]' > I'm planning on doing globbing like so: split.c getline.c bsh.c domagic.c > I don't think I like the use of [] though. No major reasons, just little > things like it uses two characters instead of one, and isn't > space-terminated. I'd prefer a sort of reverse-escape approach that worked > on a space-delimited string instead of a character, e.g. +*.o*, where "+" > is the reverse escape. But that uses two characters too (+ and space) and prevents you from globbing unambiguously in some contexts. > I'd like to see some thought given to how you would handle the result of > globbing on a directory with file names containing "*", leading "-", > spaces, etc... As for special handling of -, I think not. Of course, I could glob to "./...". -- Peter da Silva. `-_-' peter@ferranti.com +1 713 274 5180. 'U` "Have you hugged your wolf today?"