summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorjcamou <jcamou@FreeBSD.org>2005-08-29 06:47:43 +0000
committerjcamou <jcamou@FreeBSD.org>2005-08-29 06:47:43 +0000
commitd634255a1cb29074bfdbbe4efc93dc0548fda4b3 (patch)
tree731cc866fd3367f9b6dd9553de063bb379d10c71 /bin
parent0dc06b1087992bc59fc86103ebd146141f93424d (diff)
downloadFreeBSD-src-d634255a1cb29074bfdbbe4efc93dc0548fda4b3.zip
FreeBSD-src-d634255a1cb29074bfdbbe4efc93dc0548fda4b3.tar.gz
o Discuss the ways to escape an alias.
o Fix the alias syntax lines. o Refer to the Aliases subsection. PR: docs/84914 Submitted by: garys Approved by: trhodes (mentor) MFC after: 3 days
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/sh.120
1 files changed, 16 insertions, 4 deletions
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1
index 306491d..b077413 100644
--- a/bin/sh/sh.1
+++ b/bin/sh/sh.1
@@ -355,8 +355,9 @@ The following is a list of valid operators:
.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 @@ to create functions with arguments.
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 @@ for the file.
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 @@ built-in command prints the names and values of all defined aliases
.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)
OpenPOWER on IntegriCloud