From owner-svn-src-stable-8@FreeBSD.ORG Sat Feb 5 21:02:13 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FB25106566B; Sat, 5 Feb 2011 21:02:13 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F5BC8FC1A; Sat, 5 Feb 2011 21:02:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p15L2DUV040840; Sat, 5 Feb 2011 21:02:13 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p15L2DZn040837; Sat, 5 Feb 2011 21:02:13 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201102052102.p15L2DZn040837@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 5 Feb 2011 21:02:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218344 - stable/8/bin/sh X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Feb 2011 21:02:13 -0000 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