From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29417 invoked by alias); 28 Oct 2015 16:37:43 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 37005 Received: (qmail 23074 invoked from network); 28 Oct 2015 16:37:41 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=ZOTJt3tl2X9cxN7NObkplsCo2b+xrXtVYm0PGeaY54I=; b=nLPO4RVd005dbFT8+ZYlWCjEsh2dRNP3Ke1hzRuG5u2HbzXpwdewubqpbBDQ5ZgRnZ 5Ycdcr80DjpRkSC+fhCeLfiZGLNzMBJFvYKmbjvFmWX2GOs3fhDF19hzEy5BSTZSJt8u 9KRkWxJn+ECSPZ4JvQG2ge9HPRurXW2IqBatpgnN3smx8DbfsIpJpHUYh7VjiA4+Uj5G sM/MSsxCHxSGFo/2knDH+aqlLWU7StpyEYNf8OgGy+WJSguZ2Xanj41nXLWx6bvK9CVl 0EW/N9dcdFRlRnY7hG496zeTpxe7fzyKeSODsRvy7WvDNpopvabjDmU9MNgq/NWDASTD WKNg== X-Received: by 10.25.141.143 with SMTP id p137mr12605512lfd.92.1446050258148; Wed, 28 Oct 2015 09:37:38 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20151028155943.14acea0b@pwslap01u.europe.root.pri> References: <20151028155943.14acea0b@pwslap01u.europe.root.pri> From: Sebastian Gniazdowski Date: Wed, 28 Oct 2015 17:37:18 +0100 Message-ID: Subject: Re: [PATCH] Index of element after width of characters To: Zsh hackers list Content-Type: text/plain; charset=UTF-8 On 28 October 2015 at 16:59, Peter Stephenson wrote: > On Wed, 28 Oct 2015 16:46:00 +0100 > Sebastian Gniazdowski wrote: >> I can resign from the "," and stay with "<" and ">" if Bart agrees. >> The comma would be more complicated than the rest, having 3 possible >> values: index, -1, empty string. Having only "<" and ">" it's easy to >> detect that the limit doesn't divide any char in half: > > Mikael's right, actually --- this is an indexing problem and more > consistently done with subscripts. It should actually be simpler than > the existing code for space-delimited words in scalars. Well indexes are substituted there, in e.g. "i -- lowest index of value matched by subscript", and strings are also supported, so apparently I should move my code there Best regards, Sebastian Gniazdowski