Talk:Brace expansion using ranges: Difference between revisions

No edit summary
Line 11:
===Flippin' 'eck===
What is the behaviour of echo {1..6..-2} using zsh shell on macOS Catalina? Using Linux bash 5.1 it is 1 3 5. Should flipped be 5 3 1 or 6 4 2? It is bad enough when task descriptions require one to debug Python to make sense of it but zsh shell on macOS Catalina, come on.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 14:31, 27 September 2021 (UTC)
 
Good point. On zsh 5.8 (macOs – x86_64-apple-darwin20.0), the expansion of {1..6..-2} turns out to be [5,3,1] ...
Perhaps zsh is just not a sufficiently well-defined or consistently implemented target for such a task ?
Do you know of an arguably canonical implementation of zsh, with well-defined and consistent enumeration rules we could formally summarize and illustrate here ? [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 18:07, 28 September 2021 (UTC)
9,655

edits