summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2010-12-21 22:48:56 +0000
committerjilles <jilles@FreeBSD.org>2010-12-21 22:48:56 +0000
commitdbd8131dd6648104df2d955eb6d08a6885e80694 (patch)
tree4007b98a73e619097fcd2f1a84850705f3290ad0 /bin
parentae2aabc34981e0a4fc74b41bde3cfd6ff4166022 (diff)
downloadFreeBSD-src-dbd8131dd6648104df2d955eb6d08a6885e80694.zip
FreeBSD-src-dbd8131dd6648104df2d955eb6d08a6885e80694.tar.gz
sh(1): Explain why it is a bad idea to use aliases in scripts.
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/sh.17
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1
index 8f92bbb..275c5e2 100644
--- a/bin/sh/sh.1
+++ b/bin/sh/sh.1
@@ -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
OpenPOWER on IntegriCloud