Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Nov 2012 00:14:48 GMT
From:      Derek Wood <ddwood@outlook.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   docs/173410: [patch] sh(1) include PS1 expansions in man page
Message-ID:  <201211060014.qA60EmKq018170@red.freebsd.org>
Resent-Message-ID: <201211060020.qA60K05O062021@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211060014.qA60EmKq018170>