From cf74e00b6dbdab725bf05525850163b3db7c61c8 Mon Sep 17 00:00:00 2001 From: Jason McIntyre Date: Tue, 9 Nov 2004 21:56:55 +0000 Subject: /bin/sh supports PS1 expansion; --- bin/ksh/sh.1 | 18 +++++++++++++++--- bin/ksh/sh.1tbl | 18 +++++++++++++++--- 2 files changed, 30 insertions(+), 6 deletions(-) (limited to 'bin/ksh') diff --git a/bin/ksh/sh.1 b/bin/ksh/sh.1 index 5da6b46b4ec..4e64b389119 100644 --- a/bin/ksh/sh.1 +++ b/bin/ksh/sh.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sh.1,v 1.51 2004/11/05 14:56:31 jmc Exp $ +.\" $OpenBSD: sh.1,v 1.52 2004/11/09 21:56:54 jmc Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -1280,8 +1280,20 @@ below. .It Ev PPID The process ID of the shell's parent (read-only). .It Ev PS1 -The prompt is printed verbatim (i.e., no substitutions are done). -Default is +The primary prompt for interactive shells. +Parameter, command, and arithmetic +substitutions are performed. +.Ql \&! +is replaced with the current command number (see the +.Ic fc +command below). +A literal +.Ql \&! +can be put in the prompt by placing +.Ql !! +in +.Ev PS1 . +The default is .Dq \&$\ \& for non-root users, .Dq \&#\ \& diff --git a/bin/ksh/sh.1tbl b/bin/ksh/sh.1tbl index ab67ade1db2..7691d4a2f2d 100644 --- a/bin/ksh/sh.1tbl +++ b/bin/ksh/sh.1tbl @@ -1,4 +1,4 @@ -.\" $OpenBSD: sh.1tbl,v 1.51 2004/11/05 14:56:31 jmc Exp $ +.\" $OpenBSD: sh.1tbl,v 1.52 2004/11/09 21:56:54 jmc Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -1280,8 +1280,20 @@ below. .It Ev PPID The process ID of the shell's parent (read-only). .It Ev PS1 -The prompt is printed verbatim (i.e., no substitutions are done). -Default is +The primary prompt for interactive shells. +Parameter, command, and arithmetic +substitutions are performed. +.Ql \&! +is replaced with the current command number (see the +.Ic fc +command below). +A literal +.Ql \&! +can be put in the prompt by placing +.Ql !! +in +.Ev PS1 . +The default is .Dq \&$\ \& for non-root users, .Dq \&#\ \& -- cgit v1.2.3