[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Documentation issue

From: Clark Wang
Subject: Re: Documentation issue
Date: Fri, 27 Oct 2017 10:50:48 +0800

On Fri, Oct 27, 2017 at 3:00 AM, Eli Barzilay <address@hidden> wrote:

> On Thu, Oct 26, 2017 at 2:02 PM, Chet Ramey <address@hidden> wrote:
> >
> > It's more of a general statement about arrays, though it appears in
> > the paragraph that discusses unset, so it's in the man page section on
> > arrays.  You have to be careful about putting the same information in
> > too many different places -- the man page is big enough already.
> I'm very aware of man page bloat and the fact that the bash page is very
> long as is.  But (a) I think that the builtin section for each command
> is the more important place for such things; and (b) what I'm suggesting
> is just a short reminder sentence about the need for quoting unsets for
> array elements.
> To make it more concrete, I think that the following change will be
> good:
> 1. Drop the current "Care must be taken ... the entire array." two
>    sentences and replace them with some "See the unset builtin
>    description below".

It's not only about unset. You also need to take care of other builtin

cd: cd a[dir] vs. cd 'a[dir]'
echo: echo foo[bar] vs. echo 'foo[bar]'; echo * vs. echo '*'
eval: eval a[i]=b vs. eval 'a[i]=b'
printf: printf foo[bar] vs. printf 'foo[bar]'
set: set a[b] vs. set 'a[b]'
source: source file[name] vs. source 'file[name]'
test: test a[b] vs. test 'a[b]'

and even for external commands:

find /the/dir -name *.txt

reply via email to

[Prev in Thread] Current Thread [Next in Thread]