From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3193 invoked by alias); 8 Jan 2014 11:35:18 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 18297 Received: (qmail 23999 invoked from network); 8 Jan 2014 11:35:11 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 X-AuditID: cbfec7f4-b7f796d000005a13-88-52cd35912f6e Date: Wed, 08 Jan 2014 11:25:04 +0000 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: RFE: Brace expansion with single characters Message-id: <20140108112504.76c17284@pwslap01u.europe.root.pri> In-reply-to: References: <52CC7653.9080709@dserodio.net> <20140107231117.GB3764@ruderich.org> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplluLIzCtJLcpLzFFi42I5/e/4Vd2JpmeDDCbOVLXYcXIlowOjx6qD H5gCGKO4bFJSczLLUov07RK4MlbcP8ZWcJ6v4njrHuYGxoPcXYycHBICJhIvfjaxQ9hiEhfu rWfrYuTiEBJYyihxvOcHO5TDJHHgYycjSBWLgKrEn+UnwTrYBAwlpm6aDRYXERCVWL5iM1hc WMBC4ujcD8wgNq+AvcTi5VOBajg4OAWCJU7+rIWYOZNRonXKFSaQGn4BfYmrfz8xQVxhLzHz yhlGiF5BiR+T77GA2MwCWhKbtzWxQtjyEpvXvGWewCgwC0nZLCRls5CULWBkXsUomlqaXFCc lJ5rqFecmFtcmpeul5yfu4kREoRfdjAuPmZ1iFGAg1GJh/eG2pkgIdbEsuLK3EOMEhzMSiK8 espng4R4UxIrq1KL8uOLSnNSiw8xMnFwSjUw2s4VixV43udRIZvgen/Bw7sScsav73ziSnLL CjVNF3zg0RDbv0vkWblirJuXcHc+x6/8qMzLKpsvRPzmevpUwDrwtcAqgTMZrE0LJRuPJRfI cuip3X9WtSYjjtMy/Qzzlrw9G7XbXxSnPlM/9kDviZzD9scBSn9OMAas+fDn2pGE9YfXcv5V YinOSDTUYi4qTgQAgLtbbiACAAA= On Wed, 08 Jan 2014 10:55:05 +0100 Jerry Rocteur wrote: > echo {0..12} > > Does what is expected > > echo {a..z} > > Does nothing as expected > > setopt braceccl > echo {a-z} > > does something somebody expected ? Yes, that's how zsh works; OK so far... > Shouldn't there be some kind of uniformity or is this for a reason ? I'm not sure what you mean. Bash and zsh have different extensions. Are you saying "should they have the same set of extensions"? Not particularly, no. They copy each other to some extent but also go their own way to some exstent. The history is something like: - zsh invented the BRACECCL option (this has been there for donkey's years) which expands everything in the brace as a single character (even if the character is repeated in the base), except that "-" is a special case to indicate a range. This is rather different from the feature required --- it makes braces without commas do rather more than you expect, as noted by Vincent. That's not a bug, however; its significant additional effect is why it's an option. - zsh invented the {..} syntax (vaguely inspired by Perl). This isn't an option because it's specific enough not to cause problems. - bash also started using that syntax, but added the extra feature with single character ranges. > The other two shells work as expected. As far as I can see, and as your comments at the top suggest, everything works as expected. Are you saying both bash and zsh currently work as documented? I think that's correct. The original post was simply a request for a new feature. It looks fairly straightforward to add the bash feature to zsh in this case and I've just been looking at it. I would imagine this will fit in naturally enough not to cause complications. pws