svn commit: r218344 - stable/8/bin/sh
Jilles Tjoelker
jilles at FreeBSD.org
Sat Feb 5 21:02:13 UTC 2011
Author: jilles
Date: Sat Feb 5 21:02:13 2011
New Revision: 218344
URL: http://svn.freebsd.org/changeset/base/218344
Log:
MFC r216630: Explain why it is a bad idea to use aliases in scripts.
Modified:
stable/8/bin/sh/sh.1
Directory Properties:
stable/8/bin/sh/ (props changed)
Modified: stable/8/bin/sh/sh.1
==============================================================================
--- stable/8/bin/sh/sh.1 Sat Feb 5 21:00:35 2011 (r218343)
+++ stable/8/bin/sh/sh.1 Sat Feb 5 21:02:13 2011 (r218344)
@@ -462,9 +462,10 @@ would become
Aliases provide a convenient way for naive users to
create shorthands for commands without having to learn how
to create functions with arguments.
-They can also be
-used to create lexically obscure code.
-This use is discouraged.
+Using aliases in scripts is discouraged
+because the command that defines them must be executed
+before the code that uses them is parsed.
+This is fragile and not portable.
.Pp
An alias name may be escaped in a command line, so that it is not
replaced by its alias value, by using quoting characters within or
More information about the svn-src-stable-8
mailing list