From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2078 invoked by alias); 28 Oct 2013 17:55:25 -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: 18070 Received: (qmail 20812 invoked from network); 28 Oct 2013 17:55:09 -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: cbfec7f5-b7ef66d00000795a-0e-526ea4fa7fc3 Date: Mon, 28 Oct 2013 17:55:05 +0000 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: Twitter Daily ZSH Tip Message-id: <20131028175505.584149cc@pwslap01u.europe.root.pri> In-reply-to: <877gcxe1to.fsf@ixian.com> References: <877gcxe1to.fsf@ixian.com> 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+NgFuphluLIzCtJLcpLzFFi42I5/e/4Nd1fS/KCDM5/47TYcXIlowOjx6qD H5gCGKO4bFJSczLLUov07RK4Mn42L2QtmMtSsevFPeYGxonMXYwcHBICJhIzXpl2MXICmWIS F+6tZ+ti5OIQEljKKDH/9W1mKIdJYt+534wgVSwCqhIdsx+wgthsAoYSUzfNBouLCIhKLF+x mR3EFhZQkmiYsoENxOYVsJfovneHGcTmFFCXePV3OpgtJKAmsWz9DhYQm19AX+Lq309MEFfY S8y8coYRoldQ4sfke2A1zAJaEpu3NbFC2PISm9e8ZZ7AKDALSdksJGWzkJQtYGRexSiaWppc UJyUnmukV5yYW1yal66XnJ+7iRESgl93MC49ZnWIUYCDUYmHd8Pa3CAh1sSy4srcQ4wSHMxK Iryxk/KChHhTEiurUovy44tKc1KLDzEycXBKNTDaK/7jqJ0TZr3uVczjYIX9UvECvnZLdIuv 3nlhzsQv9Mnc9HDpq4Pvb94+tOd3tc671HnPdt9fcu54ScuDKb6bvcLWLIv/FrLuaEnI7EOR r7+vUPTcreWoE8cfFKFz96iB+gaepjlpryrt6iyv7JnTyD9T7cqz98Z/ZH+yXLb3kjNaduLU k+RuJZbijERDLeai4kQAZupK2x8CAAA= On Mon, 28 Oct 2013 10:34:59 -0700 Eric De Mund wrote: > > vi *(.om[$1]) # vim newest file > > Problem here: > > % vi *(.om[$1]) > zsh: bad math expression: operand expected at `' I think you want vi *(.om[1]) or if you wanted to be really different vi *(.Om[-1]) Otherwise you're substituting a positional parameter, which you don't want. The error you got comes from it being empty, so there's no number, which is what it's complaining about, slightly cryptically. pws