Author: jilles Date: Tue Dec 21 22:48:56 2010 New Revision: 216630 URL: http://svn.freebsd.org/changeset/base/216630
Log: sh(1): Explain why it is a bad idea to use aliases in scripts. Modified: head/bin/sh/sh.1 Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Tue Dec 21 22:47:34 2010 (r216629) +++ head/bin/sh/sh.1 Tue Dec 21 22:48:56 2010 (r216630) @@ -456,9 +456,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 _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"