From: tb Date: Tue, 12 Dec 2017 11:34:38 +0000 (+0000) Subject: Document change in the default shell prompts. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f7d60256530896d0062639b54c89d2ecb4e0e12b;p=openbsd Document change in the default shell prompts. Discussed with and ok jmc --- diff --git a/bin/csh/csh.1 b/bin/csh/csh.1 index d2e6dcc169f..a2941367b70 100644 --- a/bin/csh/csh.1 +++ b/bin/csh/csh.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: csh.1,v 1.78 2017/06/10 15:39:43 schwarze Exp $ +.\" $OpenBSD: csh.1,v 1.79 2017/12/12 11:34:38 tb Exp $ .\" $NetBSD: csh.1,v 1.10 1995/03/21 09:02:35 cgd Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)csh.1 8.2 (Berkeley) 1/21/94 .\" -.Dd $Mdocdate: June 10 2017 $ +.Dd $Mdocdate: December 12 2017 $ .Dt CSH 1 .Os .Sh NAME @@ -2532,7 +2532,7 @@ appears in the string it will be replaced by the current event number unless a preceding .Ql \e is given. -Default is +Default is the first part of the hostname, followed by .Dq % , or .Dq # diff --git a/bin/ksh/ksh.1 b/bin/ksh/ksh.1 index 812384b2ec4..67ed7108542 100644 --- a/bin/ksh/ksh.1 +++ b/bin/ksh/ksh.1 @@ -1,8 +1,8 @@ -.\" $OpenBSD: ksh.1,v 1.196 2017/11/22 12:17:34 anton Exp $ +.\" $OpenBSD: ksh.1,v 1.197 2017/12/12 11:34:38 tb Exp $ .\" .\" Public Domain .\" -.Dd $Mdocdate: November 22 2017 $ +.Dd $Mdocdate: December 12 2017 $ .Dt KSH 1 .Os .Sh NAME @@ -1539,7 +1539,7 @@ By the way, don't blame me for this hack; it's in the original .Nm . .Pp -The default prompt is +The default prompt is the first part of the hostname, followed by .Sq $\ \& for non-root users, .Sq #\ \& diff --git a/bin/ksh/sh.1 b/bin/ksh/sh.1 index 7ea6cfabd72..26731d8f8b7 100644 --- a/bin/ksh/sh.1 +++ b/bin/ksh/sh.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sh.1,v 1.143 2017/06/01 20:37:38 tb Exp $ +.\" $OpenBSD: sh.1,v 1.144 2017/12/12 11:34:38 tb Exp $ .\" .\" Copyright (c) 2015 Jason McIntyre .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: June 1 2017 $ +.Dd $Mdocdate: December 12 2017 $ .Dt SH 1 .Os .Sh NAME @@ -2101,11 +2101,6 @@ A .Sq !\& in the prompt is expanded to the number of the next command in history to be typed. -The default value is -.Sq $\ \& -for normal users and -.Sq #\ \& -for root. .It Ev PS2 Newline prompt displayed in an interactive shell when a newline has been entered @@ -2228,6 +2223,16 @@ built-ins should exit/return from the outermost loop if the argument is greater than the level of loops. .El .Pp +The default value for the +.Ev PS1 +user prompt contains the machine's hostname, +followed by +.Sq $\ \& +for normal users and +.Sq #\ \& +for root; +POSIX does not include the hostname. +.Pp Enabling POSIX mode changes some behaviour to make .Nm adhere more strictly to the