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

Re: Using -prune option of find to ignore hidden directories



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, May 04, 2017 at 09:36:11AM +0200, Nicolas George wrote:
> Le quintidi 15 floréal, an CCXXV, tomas@tuxteam.de a écrit :
> > Exactly. Try again in a directory with something in it, and you'll
> > appreciate the whole power/curse of the thing :-)
> > 
> > The shell takes a lot from the "ambient" (current directory, shell
> > variables inherited through the dynamic path, etc.) and this makes
> > for an incredibly concise language, but is an opportunity for incredibly
> > clever bugs.
> 
> Note that it is a severe misfeature of the shell to have a very
> different behaviour when a glob matches than when a glob does not match.

I stopped for a long time judging such things. There are languages I like
and those I don't. There are things I don't like in languages I generally
like. And so on.

> I have seen make commands fail because they contained unquoted "[a]"
> arguments and someone just created a temporary file named a.
> 
> Fortunately, zsh fixes that: a glob that does not match either produce
> an error or expand to an empty list.

One might argue that it's a misfeature of shells in general that there
are so many different implementations (giving birth to that "portable
shell" abomination which haunts Autotools to this day). But then, one
might argue that this is a strength, allowing different approaches to
be explored (which is fun, and as Alan Perlis once said, programming
*should* be about fun).

Case in point: I never used zsh, my comfort zone is smack within bash
(while avoiding a bit the most outrageous "specialties", or at least
using them with caution); still I'm really happy zsh exists, and I
enjoy tidbits as the one you gave above -- just as I enjoy listening
to different dialects of (human) languages.

Cheers
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlkK3jYACgkQBcgs9XrR2kZXgQCeLKfAcAhl1KJy7dD3BTki1dQR
kjwAnAtkBlDMgrN3cGZ1n9AGMPcShY0W
=5InS
-----END PGP SIGNATURE-----


Reply to: