docs/173410: [patch] sh(1) include PS1 expansions in man page
Derek Wood
ddwood at outlook.com
Tue Nov 6 00:20:01 UTC 2012
>Number: 173410
>Category: docs
>Synopsis: [patch] sh(1) include PS1 expansions in man page
>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: Tue Nov 06 00:20:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Derek Wood
>Release: 10.0-CURRENT
>Organization:
>Environment:
FreeBSD bespin 10.0-CURRENT FreeBSD 10.0-CURRENT #2: Thu Nov 1 10:11:06 MST 2012 root at bespin:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
sh(1) includes hostname, working directory and superuser expansion for the $PS1 and $PS2 environmental variables. This patch to the sh man page documents it.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
--- sh.1 2012-10-31 04:44:47.000000000 -0700
+++ sh.1.new 2012-11-05 17:00:03.000000000 -0700
@@ -1337,9 +1337,33 @@
.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
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-doc
mailing list