From nobody@FreeBSD.org  Tue Nov  6 00:14:48 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id A6D35B81
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  6 Nov 2012 00:14:48 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 8FB7D8FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  6 Nov 2012 00:14:48 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id qA60EmhB018171
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 6 Nov 2012 00:14:48 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id qA60EmKq018170;
	Tue, 6 Nov 2012 00:14:48 GMT
	(envelope-from nobody)
Message-Id: <201211060014.qA60EmKq018170@red.freebsd.org>
Date: Tue, 6 Nov 2012 00:14:48 GMT
From: Derek Wood <ddwood@outlook.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] sh(1) include PS1 expansions in man page
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         173410
>Category:       docs
>Synopsis:       [patch] sh(1) include PS1 expansions in man page
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    joel
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 06 00:20:00 UTC 2012
>Closed-Date:    Sun Apr 21 19:56:16 UTC 2013
>Last-Modified:  Sun Apr 21 20:00:01 UTC 2013
>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:
Responsible-Changed-From-To: freebsd-doc->eadler 
Responsible-Changed-By: eadler 
Responsible-Changed-When: Tue Nov 13 04:35:20 UTC 2012 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=173410 
Responsible-Changed-From-To: eadler->freebsd-bugs 
Responsible-Changed-By: eadler 
Responsible-Changed-When: Tue Dec 4 19:48:29 UTC 2012 
Responsible-Changed-Why:  
I havn't touched this in a bit so return to pool so someone else can 
take it 

http://www.freebsd.org/cgi/query-pr.cgi?pr=173410 
Responsible-Changed-From-To: freebsd-bugs->joel 
Responsible-Changed-By: joel 
Responsible-Changed-When: Sun Apr 21 10:49:50 UTC 2013 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=173410 
State-Changed-From-To: open->closed 
State-Changed-By: joel 
State-Changed-When: Sun Apr 21 19:55:48 UTC 2013 
State-Changed-Why:  
Patch committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=173410 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/173410: commit references a PR
Date: Sun, 21 Apr 2013 19:55:51 +0000 (UTC)

 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@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
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
