Date: Sun, 21 Apr 2013 19:55:38 +0000 (UTC) From: Joel Dahl <joel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249740 - head/bin/sh Message-ID: <201304211955.r3LJtcqq026739@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304211955.r3LJtcqq026739>