diff options
author | joel <joel@FreeBSD.org> | 2013-04-21 19:55:38 +0000 |
---|---|---|
committer | joel <joel@FreeBSD.org> | 2013-04-21 19:55:38 +0000 |
commit | 1b871737069c245a9c5577b30281da8601613bcf (patch) | |
tree | d74a3490ed4465f0b0a12663c8a3155ccbb9d0dc /bin | |
parent | 670f533a575498669a5cd2d2363498bee694b688 (diff) | |
download | FreeBSD-src-1b871737069c245a9c5577b30281da8601613bcf.zip FreeBSD-src-1b871737069c245a9c5577b30281da8601613bcf.tar.gz |
Document a few expansions for the $PS1 and $PS2 environmental variables.
PR: 173410
Submitted by: Derek Wood <ddwood@outlook.com>
Reviewed by: jilles
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sh/sh.1 | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1 index 01cb775..9e74a85 100644 --- a/bin/sh/sh.1 +++ b/bin/sh/sh.1 @@ -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 defaults to .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 |