From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 548 invoked by alias); 31 May 2015 23:59:52 -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: 35347 Received: (qmail 15137 invoked from network); 31 May 2015 23:59:50 -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=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=0CJXpS9cDg34m18eV82RgCStoXcHTQBVCy/PwgfP3Xg=; b=a+3yWjVaw/K0CCwU2tVufYD1HbmMahsbmMZXSbp/BlLvaG5BYY6UnnukbqDYrJG3FQ XUFHedc873kQSi2AZCkPYyiK3G8U6EMRJWQyfaRC1I1nE6bslgqvl/zPjRmq83FjFhLg hMn2QhO6vpCT2piqYLPm9x+/tEQVSrwA8WNEjmY3nQegIfBdJly4RZ3xPw2c1jk6k2zN ppDSAGfeKFvhncgJLQSpjnyBxSFyJtwGuUDYoW6f8TrYWGvhuNoLX8/v0t2/SoagrkSG GoWAo8TInGR/oNO/TB/JB58i+Kr9gC2LvFtZPUIshfQ4BF9jp0n9p9wxm7i+UkLC920P 6w4w== X-Gm-Message-State: ALoCoQktH4BXG7RdxTG9Se5f1rwC4vnOvQh6SFHKOZlYZLiA4JxRrr+yW2z0AVBmw2KYH8KwEfnB X-Received: by 10.182.120.198 with SMTP id le6mr11743403obb.37.1433116786517; Sun, 31 May 2015 16:59:46 -0700 (PDT) From: Bart Schaefer Message-Id: <150531165942.ZM13040@torch.brasslantern.com> Date: Sun, 31 May 2015 16:59:42 -0700 In-Reply-To: <12467.1433064564@thecus.kiddle.eu> Comments: In reply to Oliver Kiddle "Re: Finding the first history event of the current instance" (May 31, 11:29am) References: <87r3q7nzkr.fsf@gmail.com> <150529171657.ZM15077@torch.brasslantern.com> <150530154236.ZM17511@torch.brasslantern.com> <12467.1433064564@thecus.kiddle.eu> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh workers Subject: Re: Finding the first history event of the current instance MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On May 31, 11:29am, Oliver Kiddle wrote: } Subject: Re: Finding the first history event of the current instance } } > The options -N (new), -O (old), and -F (foreign) are all currently unused } > by "fc" if we wanted to add multiple filterings. } } I think I'd favour +L for foreign (i.e. not local). It's easier to } remember that way. That'd be fine by me, but read on. } I'm not sure how the option parser works but that may } change the meaning of fc + which isn't ideal. I don't think it'll affect that at all. However, it will mean that "fc +l" has the same meaning as "fc -l", unless we do a lot of special processing. (Same for +r/-r etc.) So maybe we don't want that. } For new/old, one option would be to have a special token such as "-", } ".", "^" or "0" that can be used to indicate the history number } when the shell started. What if someone loads (or reloads) history with "fc -R"? Ought those be considered "new" in the current shell? } Admittedly, this doesn't allow you to get a history entry matching a } pattern from the old entries. You can use -m with a range: schaefer<502> fc -l -m echo\* 101 200 fc: no matching events found schaefer<503> fc -l -m echo\* 201 300 250 echo $CPATH