Re: Documentation issue

2017-10-30 Thread Greg Wooledge
On Mon, Oct 30, 2017 at 12:05:51AM -0400, Eli Barzilay wrote: > Again, `unset` has different expectations, because it seems like it > would be a special construct Only to you, and only because you brought in some expectations from a different language. > -- since it's dealing with *lvalues*.

Re: Documentation issue

2017-10-29 Thread Eli Barzilay
On Sun, Oct 29, 2017 at 10:44 PM, Clark Wang wrote: > > Different people have different expectations which they believe are > all important. Yes, and I have already went over this several times: this is an issue that does confuse people, both ones that I have spoken to and in

Re: Documentation issue

2017-10-29 Thread Clark Wang
On Fri, Oct 27, 2017 at 3:28 PM, Eli Barzilay wrote: > On Fri, Oct 27, 2017 at 2:37 AM, Clark Wang wrote: > > > > What `unset' does is special but there's nothing special when parsing > > the command and bash even does not care if it's built-in command or

Re: Documentation issue

2017-10-29 Thread Eli Barzilay
On Fri, Oct 27, 2017 at 2:12 PM, Chet Ramey wrote: > > Let's see if I can find some compromise language that will take care > of the general case. Since it's a compromise, no one will be > satisfied, of course. Thanks -- any improvement would be good. --

Re: Documentation issue

2017-10-27 Thread Chet Ramey
On 10/26/17 10:50 PM, Clark Wang wrote: > On Fri, Oct 27, 2017 at 3:00 AM, Eli Barzilay wrote: > >> On Thu, Oct 26, 2017 at 2:02 PM, Chet Ramey wrote: >>> >>> It's more of a general statement about arrays, though it appears in >>> the paragraph that

Re: Documentation issue

2017-10-27 Thread Eli Barzilay
On Fri, Oct 27, 2017 at 2:37 AM, Clark Wang wrote: > > What `unset' does is special but there's nothing special when parsing > the command and bash even does not care if it's built-in command or > not. Exactly -- and this kind of a clarification is exactly the thing that many

Re: Documentation issue

2017-10-27 Thread Clark Wang
On Fri, Oct 27, 2017 at 1:17 PM, Eli Barzilay wrote: > > I already said why `unset` is different. If it wasn't clear, a direct > example is the fact that `delete` in javascript is a special syntax > rather than a function. To make it more confusing, the other obvious > place

Re: Documentation issue

2017-10-26 Thread Eli Barzilay
On Thu, Oct 26, 2017 at 10:50 PM, Clark Wang wrote: > On Fri, Oct 27, 2017 at 3:00 AM, Eli Barzilay wrote: >> >> 1. Drop the current "Care must be taken ... the entire array." two >>sentences and replace them with some "See the unset builtin >>

Re: Documentation issue

2017-10-26 Thread Clark Wang
On Fri, Oct 27, 2017 at 3:00 AM, Eli Barzilay wrote: > On Thu, Oct 26, 2017 at 2:02 PM, Chet Ramey 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

Re: Documentation issue

2017-10-26 Thread Eli Barzilay
On Thu, Oct 26, 2017 at 2:02 PM, Chet Ramey 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

Re: Documentation issue

2017-10-26 Thread Chet Ramey
On 10/26/17 11:28 AM, Eli Barzilay wrote: >> I'm not sure why this is a surprise. Pathname expansion (globbing) is >> one of the word expansions performed before a simple command is >> executed. The `unset' builtin is no different. > > The last sentence is showing why it's a surprise: it is

Re: Documentation issue

2017-10-26 Thread Eli Barzilay
Pierre Gaston: > I think it's even more likely to happen with eg: read array[i] Maybe, but see below. > There is a large number of pitfalls in bash > (http://mywiki.wooledge.org/BashPitfalls) that most people ignore. And it doesn't even mention the unset problem, I think. On Thu, Oct 26, 2017

Re: Documentation issue

2017-10-26 Thread Chet Ramey
On 10/26/17 1:18 AM, Eli Barzilay wrote: > Bash surprised me with the behavior mentioned here: > > https://stackoverflow.com/questions/15897473 > > This can be pretty bad in that it's very unexpected (see the comments). I'm not sure why this is a surprise. Pathname expansion (globbing) is

Re: Documentation issue

2017-10-26 Thread Pierre Gaston
On Thu, Oct 26, 2017 at 8:18 AM, Eli Barzilay wrote: > Bash surprised me with the behavior mentioned here: > > https://stackoverflow.com/questions/15897473 > > This can be pretty bad in that it's very unexpected (see the comments). > Also, the surprise can be triggered

Re: Documentation issue: Increments in brace expansion

2009-10-30 Thread Chet Ramey
Jan Schampera wrote: Good morning, http://www.gnu.org/software/bash/manual/bashref.html#Brace-Expansion The brace expansion increment syntax is shown wrong. OLD: A sequence expression takes the form {x..y[incr]}, where x and y are either integers or single characters, and incr, an