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

According to Marc Herbert on 11/30/2009 3:18 AM:
> A long time ago I read somewhere that aliases are not recommended. I
> think they do not bring anything on the table compared to functions, do
> they?

There is one thing that aliases can do that functions cannot - and that is
control how the rest of the statement is parsed.  This can be exploited to
write an alias for find that calls a function with globbing temporarily
turned off for the rest of the statement; the function then restores
globbing state after executing the real find under the hood.

http://www.chiark.greenend.org.uk/~sgtatham/aliases.html

But yes, other than cool hacks like that, functions are almost always
hands down more powerful than aliases.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             e...@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAksTwWUACgkQ84KuGfSFAYAhdwCcCO7fGXLSu9QYODSr/lsK765Y
kOcAoMnj6ZKikCBKRDlC6dCluycSWaQ2
=kfKZ
-----END PGP SIGNATURE-----


Reply via email to