svn commit: r249740 - head/bin/sh
Joel Dahl
joel at FreeBSD.org
Sun Apr 21 19:55:39 UTC 2013
Author: joel (doc committer)
Date: Sun Apr 21 19:55:38 2013
New Revision: 249740
URL: http://svnweb.freebsd.org/changeset/base/249740
Log:
Document a few expansions for the $PS1 and $PS2 environmental variables.
PR: 173410
Submitted by: Derek Wood <ddwood at outlook.com>
Reviewed by: jilles
Modified:
head/bin/sh/sh.1
Modified: head/bin/sh/sh.1
==============================================================================
--- head/bin/sh/sh.1 Sun Apr 21 19:42:04 2013 (r249739)
+++ head/bin/sh/sh.1 Sun Apr 21 19:55:38 2013 (r249740)
@@ -32,7 +32,7 @@
.\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95
.\" $FreeBSD$
.\"
-.Dd March 24, 2013
+.Dd April 21, 2013
.Dt SH 1
.Os
.Sh NAME
@@ -1340,9 +1340,33 @@ The primary prompt string, which default
.Dq Li "$ " ,
unless you are the superuser, in which case it defaults to
.Dq Li "# " .
+.Va PS1
+may include any of the following formatting sequences,
+which are replaced by the given information:
+.Bl -tag -width indent
+.It Li \eH
+The local hostname.
+.It Li \eh
+The fully-qualified hostname.
+.It Li \eW
+The final component of the current working directory.
+.It Li \ew
+The entire path of the current working directory.
+.It Li \e$
+Superuser status.
+.Dq Li "$ "
+for normal users and
+.Dq Li "# "
+for superusers.
+.It Li \e\e
+A literal backslash.
+.El
.It Va PS2
The secondary prompt string, which defaults to
.Dq Li "> " .
+.Va PS2
+may include any of the formatting sequences from
+.Va PS1 .
.It Va PS4
The prefix for the trace output (if
.Fl x
More information about the svn-src-head
mailing list