move text on ${array} => ${array[0]} implicitly, it is more global

This commit is contained in:
tg
2018-04-16 00:22:28 +00:00
parent 0096aeeed4
commit 99f6aae983

17
mksh.1
View File

@ -1,8 +1,9 @@
.\" $MirOS: src/bin/mksh/mksh.1,v 1.451 2017/08/16 21:40:14 tg Exp $
.\" $MirOS: src/bin/mksh/mksh.1,v 1.452 2018/04/16 00:22:28 tg Exp $
.\" $OpenBSD: ksh.1,v 1.160 2015/07/04 13:27:04 feinerer Exp $
.\"-
.\" Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
.\" 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
.\" 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
.\" 2018
.\" mirabilos <m@mirbsd.org>
.\"
.\" Provided that these terms and disclaimer and all copyright notices
@ -76,7 +77,7 @@
.\" with -mandoc, it might implement .Mx itself, but we want to
.\" use our own definition. And .Dd must come *first*, always.
.\"
.Dd $Mdocdate: August 16 2017 $
.Dd $Mdocdate: April 16 2018 $
.\"
.\" Check which macro package we use, and do other -mdoc setup.
.\"
@ -1364,6 +1365,10 @@ or
where
.Ar name
is a parameter name.
Substitutions of an an array in scalar context, i.e. without an
.Ar expr
in the latter form mentioned above, expand the element with the key
.Dq 0 .
Substitution of all array elements with
.Pf ${ Ns Ar name Ns \&[*]}
and
@ -1519,11 +1524,7 @@ on it; if
.Ar word
is not needed, it is not evaluated.
.Pp
The following forms of parameter substitution can also be used (if
.Ar name
is an array, the element with the key
.Dq 0
will be substituted in scalar context):
The following forms of parameter substitution can also be used:
.Pp
.Bl -tag -width Ds -compact
.It Pf ${# Ns Ar name Ns \&}