Re: Bug: please document extended and alternate for loop syntax

2025-03-07 Thread Lawrence Velázquez
On Fri, Mar 7, 2025, at 12:23 PM, John Wiersba via Bug reports for the GNU Bourne Again SHell wrote: > You're discouraging it's use by not documenting it. That is the point, I believe. > BTW, according to those links below, apparently zsh documents it This is true. https://zsh.sourceforge.io/D

Re: Bug: please document extended and alternate for loop syntax

2025-03-07 Thread John Wiersba via Bug reports for the GNU Bourne Again SHell
Thanks, Greg!!! On Friday, March 7, 2025 at 01:19:28 PM EST, Greg Wooledge wrote: On Fri, Mar 07, 2025 at 17:23:57 +, John Wiersba via Bug reports for the GNU Bourne Again SHell wrote: >    - Is our conversation being recorded somewhere in the gnu archives, so >that I can link to

Re: Bug: please document extended and alternate for loop syntax

2025-03-07 Thread Greg Wooledge
On Fri, Mar 07, 2025 at 17:23:57 +, John Wiersba via Bug reports for the GNU Bourne Again SHell wrote: >- Is our conversation being recorded somewhere in the gnu archives, so > that I can link to it in my stackoverflow question?  Otherwise, I'll just > clip quotes from it to paste there.

Re: Bug: please document extended and alternate for loop syntax

2025-03-07 Thread John Wiersba via Bug reports for the GNU Bourne Again SHell
Thanks for your reply, Chet!  You're discouraging it's use by not documenting it.  BTW, according to those links below, apparently zsh documents it (and encourages its use)?  Two questions: - Is there a link to some page where you document obsolete/discouraged/deprecated constructs?

Re: Bug: please document extended and alternate for loop syntax

2025-03-07 Thread Chet Ramey
On 3/7/25 9:23 AM, John Wiersba via Bug reports for the GNU Bourne Again SHell wrote: In all versions of bash since 2001 (e.g. 5.1.16(1)-release), the following syntax works but is not documented:$ for (( i=0; i<3; ++i )) { echo $i; } 0 1 2 The group command as loop body syntax only exists for

Bug: please document extended and alternate for loop syntax

2025-03-07 Thread John Wiersba via Bug reports for the GNU Bourne Again SHell
In all versions of bash since 2001 (e.g. 5.1.16(1)-release), the following syntax works but is not documented:$ for (( i=0; i<3; ++i )) { echo $i; } 0 1 2 The manpage only lists this syntax: for (( expr1 ; expr2 ; expr3 )) ; do list ; done$ bash --version | head -1 # on a Dell desktop, linux