Bug 173410

Summary: [patch] sh(1) include PS1 expansions in man page
Product: Documentation Reporter: Derek Wood <ddwood>
Component: Books & ArticlesAssignee: Joel Dahl <joel>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Derek Wood 2012-11-06 00:20:00 UTC
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.

Fix: Patch attached with submission follows:
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2012-11-13 04:35:20 UTC
Responsible Changed
From-To: freebsd-doc->eadler

I'll take it.
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2012-12-04 19:48:29 UTC
Responsible Changed
From-To: eadler->freebsd-bugs

I havn't touched this in a bit so return to pool so someone else can 
take it
Comment 3 Joel Dahl freebsd_committer freebsd_triage 2013-04-21 11:49:50 UTC
Responsible Changed
From-To: freebsd-bugs->joel

Take.
Comment 4 Joel Dahl freebsd_committer freebsd_triage 2013-04-21 20:55:48 UTC
State Changed
From-To: open->closed

Patch committed. Thanks!
Comment 5 dfilter service freebsd_committer freebsd_triage 2013-04-21 20:55:51 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"