From owner-freebsd-doc@FreeBSD.ORG Sun Aug 14 16:10:16 2005 Return-Path: X-Original-To: freebsd-doc@hub.freebsd.org Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C637816A420 for ; Sun, 14 Aug 2005 16:10:16 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE12943D53 for ; Sun, 14 Aug 2005 16:10:15 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7EGAFM3066782 for ; Sun, 14 Aug 2005 16:10:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7EGAFuE066781; Sun, 14 Aug 2005 16:10:15 GMT (envelope-from gnats) Resent-Date: Sun, 14 Aug 2005 16:10:15 GMT Resent-Message-Id: <200508141610.j7EGAFuE066781@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, garys@opusnet.com Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CA96616A41F for ; Sun, 14 Aug 2005 16:07:45 +0000 (GMT) (envelope-from garys@opusnet.com) Received: from opusnet.com (mail.opusnet.com [209.210.200.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 715FD43D46 for ; Sun, 14 Aug 2005 16:07:45 +0000 (GMT) (envelope-from garys@opusnet.com) Received: from localhost.localhost [70.98.246.232] by opusnet.com with ESMTP (SMTPD32-8.05) id AC4FDA1F0098; Sun, 14 Aug 2005 09:07:43 -0700 Received: from localhost.localhost (localhost.localhost [127.0.0.1]) by localhost.localhost (8.13.3/8.13.3) with ESMTP id j7EGAY6p073236 for ; Sun, 14 Aug 2005 09:10:34 -0700 (PDT) (envelope-from garys@opusnet.com) Received: (from jojo@localhost) by localhost.localhost (8.13.3/8.13.3/Submit) id j7EGATrN073235; Sun, 14 Aug 2005 09:10:29 -0700 (PDT) (envelope-from garys@opusnet.com) Message-Id: Date: Sun, 14 Aug 2005 09:10:29 -0700 From: "Gary W. Swearingen" To: FreeBSD-gnats-submit@FreeBSD.org Cc: Subject: docs/84914: [patch] sh(1) manpage omits ways to escape an alias name X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: garys@opusnet.com List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Aug 2005 16:10:17 -0000 >Number: 84914 >Category: docs >Synopsis: [patch] sh(1) manpage omits ways to escape an alias name >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Sun Aug 14 16:10:15 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Gary W. Swearingen >Release: HEAD 08'aug'05 >Organization: none >Environment: n/a >Description: The sh(1) manpage fails to discuss the ways to escape an alias invocation. Also, the alias syntax lines are not quite right. Also, the alias command description doesn't refer to the "Aliases" subsection. >How-To-Repeat: n/a >Fix: --- sh..orig.1 Tue Jun 14 01:25:00 2005 +++ sh.1 Mon Aug 8 11:52:55 2005 @@ -355,8 +355,9 @@ .El .Ss Quoting Quoting is used to remove the special meaning of certain characters -or words to the shell, such as operators, whitespace, or -keywords. +or words to the shell, such as operators, whitespace, keywords, +or alias names. +.Pp There are three types of quoting: matched single quotes, matched double quotes, and backslash. .Bl -tag -width indent @@ -422,6 +423,15 @@ They can also be used to create lexically obscure code. This use is discouraged. +.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 +adjacent to the alias name. This is most often done by prefixing +an alias name with a backslash to execute a function, built-in, or +normal program with the same name. +See the +.Sx Quoting +subsection. .Ss Commands The shell interprets the words it reads according to a language, the specification of which is outside the scope @@ -1352,8 +1362,7 @@ If it is not found in the .Ev PATH , it is sought in the current working directory. -.It Ic alias Op Ar name ... -.It Ic alias Op Ar name Ns = Ns Ar string ... +.It Ic alias Oo Ar name Ns Oo = Ns Ar string Oc ... Oc If .Ar name Ns = Ns Ar string is specified, the shell defines the alias @@ -1372,6 +1381,9 @@ .Ic unalias ) . Alias values are written with appropriate quoting so that they are suitable for re-input to the shell. +Also see the +.Sx Aliases +subsection. .It Ic bg Op Ar job ... Continue the specified jobs (or the current job if no jobs are given) >Release-Note: >Audit-Trail: >Unformatted: