From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28636 invoked by alias); 14 Jan 2016 18:55:55 -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: 37627 Received: (qmail 20167 invoked from network); 14 Jan 2016 18:55:54 -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 :cc:content-type; bh=PBxrvotxq285gwhncNcw3IL+EDjVvTQZrb7AYBmJDu4=; b=LtXzUkcs7S8IzZSjYez7qghbF43lMluXNOIx4VpAEAfzKuVRbTJdjDlxOZtF8CZZHE hQk22m8DcP3Qh8dHdJ1k3oQhfSlbH7mVSfYqCH1zVt3bpdtpSOTmpo4vYaYVVtC77ze+ 3L3kFFNqyhcSKQZH3DTzDhDuaY04TTK+Qm0bwmOlwO56w5qpmQKoREWqtwkpT71W0po4 zT9pRrNItmz+Nu4gecwz8oykXz1AuOJX/h17ltdv7blTZt/pWJmeKpOUrw9z0N2+nQ5A Gfp+jHCTbKou4XJ5XBsoSS2bDDThU9048UuBePrlaTbCqYqLrYls7FM7LMltLhvvB9bt Wa7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=PBxrvotxq285gwhncNcw3IL+EDjVvTQZrb7AYBmJDu4=; b=Ra8XbTHAI40fE4xecd1CxJFQQ+YRw6tmrMtDxgINi61Vy3+tf1OsHgjYb3tfTNF/9a zO8r5bw9afQ9O4MLIZ98uOHZiKqLwKDjr54wMdrIU1JBWQZruSor96Mnsm9EGFgGP26K SCwQWdVuKDhF580Kjsi9Xa0zlnakVNzv+svf5GJdGCbDynbwhGWE0N6bw8BGQmucaLMR d3PCc5srKj5dMYUWQ1Z3Ds8hFF8ndqA8OPmH9hDdhHVjNJ8UAfSo39NXp2ag32IfncKy 521Y6M3TPxgML5MzMZz1Fq8dRDXCoKV0u99ZNyaG9Rc3vu4uhK6LBSMG1SMW6GJgFQAp 2/Eg== X-Gm-Message-State: ALoCoQngxgPealBAvogMQ+xCP3UVLB/trewYEZ0gIhaewOAmnfxaKsQ/WqBN/VT/7ounbIMqqUL2Qw0BDykegY/MYbvZyxMf1A== X-Received: by 10.112.199.41 with SMTP id jh9mr1562923lbc.125.1452797750915; Thu, 14 Jan 2016 10:55:50 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <160113204847.ZM14158@torch.brasslantern.com> References: <160111161501.ZM5305@torch.brasslantern.com> <160112113928.ZM9065@torch.brasslantern.com> <20160113010147.GA4699@tarsus.local2> <160112180141.ZM9984@torch.brasslantern.com> <160113204847.ZM14158@torch.brasslantern.com> From: Sebastian Gniazdowski Date: Thu, 14 Jan 2016 19:55:31 +0100 Message-ID: Subject: Re: _history-complete-older problems with $( To: Bart Schaefer Cc: Zsh hackers list Content-Type: text/plain; charset=UTF-8 On 14 January 2016 at 05:48, Bart Schaefer wrote: > Ah. Another wrinkle I overlooked. You need to store the original > values of $PREFIX and $SUFFIX somewhere, e.g. > > local origPREFIX=$PREFIX origSUFFIX=$SUFFIX > > Then, after "compadd -O found" but before trimming PREFIX and SUFFIX > off of $found, you need > > PREFIX=${PREFIX#$origPREFIX} > SUFFIX=${SUFFIX%$origSUFFIX} > Setting PREFIX and SUFFIX this way changes things (apparently for the better, the code works very well with them, except for $( as I shown in other video, the "Better" one), but it's interesting that PREFIX and SUFFIX do not change their values, I showed this in following video: https://asciinema.org/a/cf8yrmdzjqy7r2kz42091ujts If I do PREFIX="$PREFIX" SUFFIX="$SUFFIX" then it doesn't change things, interestingly, it's like no assignment would be done. Best regards, Sebastian