From owner-freebsd-questions Fri Dec 20 11:49:47 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 505D537B401 for ; Fri, 20 Dec 2002 11:49:45 -0800 (PST) Received: from sccrmhc02.attbi.com (sccrmhc02.attbi.com [204.127.202.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC1B243EE8 for ; Fri, 20 Dec 2002 11:49:44 -0800 (PST) (envelope-from kkb@breathhost.net) Received: from [192.168.1.63] (12-240-247-89.client.attbi.com[12.240.247.89]) by sccrmhc02.attbi.com (sccrmhc02) with SMTP id <20021220194938002000dd6ie>; Fri, 20 Dec 2002 19:49:38 +0000 User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.0.3 Date: Fri, 20 Dec 2002 11:49:37 -0800 Subject: Re: chown broken?? From: Kurt Bigler To: Fernando Gleiser , Message-ID: In-Reply-To: <20021220123728.S52840-100000@cactus.fi.uba.ar> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG on 12/20/02 7:39 AM, Fernando Gleiser wrote: > On Fri, 20 Dec 2002, Roman Neuhauser wrote: > >> apart from what others said about wildcard substitution: >> >> roman@freepuppy /usr 1005:1 > ls -l .* >> zsh: no matches found: .* >> roman@freepuppy /usr 1006:1 > >> >> IOW, the behavior is actually shell- (and shell configuration-) >> dependent. > > Yes, because wildcard expansion is done by the shell. > >> zsh (at least with my settings) would protect you from >> yourself in this situation. > > And will prevent you from doing it when you really need it :) I don't know zsh, but if it has a setting that prevents wildcard expansion from including .. as a match for .* that strikes me as an all-around good thing. When do you _really_need_ .* to match .. ? You could in such a situation type .. explicitly, just as you would often add .* when * does not work. One possible approach with some nice "consistency" would be: * matches: foo but not .foo .* matches: .foo but not ..foo (and not ..) Of course to remain fully consistent with this approach (by one interpretation), foo* would not match foo.foo - rather you would have to type foo.* or foo*.* according to your needs. This might fail to meet expectatons in more situations than the ones it fixes. That aside, even an interpretation of .* that allows ..fo but simply disallows only .. still strikes me as an all-around good thing. Anyone hurt by this (at least on the command line) can simply add .. explicitly to the list. Maybe it would be an improvement to unix if this change were made to all shells, or even just to go into prompt for "y" mode when hitting ".." in this one case (if the shell is interactive). Kurt Bigler > > > Fer > >> >> -- >> If you cc me or remove the list(s) completely I'll most likely ignore >> your message. see http://www.eyrie.org./~eagle/faqs/questions.html >> >> To Unsubscribe: send mail to majordomo@FreeBSD.org >> with "unsubscribe freebsd-questions" in the body of the message >> > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message