From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17743 invoked by alias); 6 Sep 2014 20:13:40 -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: 19057 Received: (qmail 25920 invoked from network); 6 Sep 2014 20:13:27 -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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Date: Sat, 6 Sep 2014 22:13:25 +0200 From: Roman Neuhauser To: Bart Schaefer Cc: zsh-users@zsh.org Subject: Re: set -o nounset; foo=(); print ${foo:#bar} Message-ID: <20140906201325.GS4075@isis.sigpipe.cz> References: <20140906184749.GR4075@isis.sigpipe.cz> <140906123433.ZM20433@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <140906123433.ZM20433@torch.brasslantern.com> User-Agent: Mutt/1.5.23 (2014-03-12) # schaefer@brasslantern.com / 2014-09-06 12:34:33 -0700: > I don't immediately see a simple code change that would do so, but I'm > sure it can eventually be fixed. cool! btw will this be tracked somewhere? > You can use ${foo##bar(#e)} with extendedglob, I think, but it may > depend on context. Without extendedglob I don't see a good way. (reminder to self: (#e) is like $ in REs) thanks a lot! extendedglob is fine and the workaround works perfectly. -- roman