From owner-freebsd-doc@FreeBSD.ORG Tue Nov 6 00:20:01 2012 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3B2B7BB3 for ; Tue, 6 Nov 2012 00:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 0FE768FC0C for ; Tue, 6 Nov 2012 00:20:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id qA60K0JE062022 for ; Tue, 6 Nov 2012 00:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qA60K05O062021; Tue, 6 Nov 2012 00:20:00 GMT (envelope-from gnats) Resent-Date: Tue, 6 Nov 2012 00:20:00 GMT Resent-Message-Id: <201211060020.qA60K05O062021@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Derek Wood Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A6D35B81 for ; 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 ; 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 ; 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 To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: docs/173410: [patch] sh(1) include PS1 expansions in man page X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Nov 2012 00:20:01 -0000 >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: