From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4959 invoked by alias); 23 Feb 2010 02:48:39 -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: 27749 Received: (qmail 4707 invoked from network); 23 Feb 2010 02:48:29 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <100222184752.ZM26580@torch.brasslantern.com> Date: Mon, 22 Feb 2010 18:47:51 -0800 In-reply-to: <2d460de71002220942y27ad63acxa3df7a9838ace0b8@mail.gmail.com> Comments: In reply to Richard Hartmann "Proposed feature: Selectively avoid adding to history (with code)" (Feb 22, 6:42pm) References: <2d460de71002220942y27ad63acxa3df7a9838ace0b8@mail.gmail.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Proposed feature: Selectively avoid adding to history (with code) MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Feb 22, 6:42pm, Richard Hartmann wrote: } } zshaddhistory(){if [[ -n $FOO ]]; then return 1; fi} } } This allows me to modify my prompt, giving a visual clue that I am in } try-out mode and will not put random testing stuff into my history. } } 1) If anyone else thinks this is useful and if it should be a _function It'd be more useful if I could retroactively delete the last several commands from my history, because I never remember to turn this sort of thing on before I start testing. :-) I'm not sure what you mean by "should be a _function"? } 2) If "$HIST_NO_STORE" is a good variable name Hrm. The option of that name means not to store commands that are for history access (and hence was a poor model for all the other "HIST_" options that came after it, e.g., HIST_NO_FUNCTIONS should really be FUNC_NO_STORE if the pattern had been properly applied). HIST_DISABLE or would probably be a better name. Won't one of the side- effects be that you can't find those commands in the interactive history either? I'd like stuff to remain in the interactive history but somehow be tagged so they're never written to $HISTFILE, which brings me to ... } 3) If this would be better handled in an option A tagging effect probably does need to be controlled by an option, as the alternative is a builtin you can only call from zshaddhistory() or some such; but I think for what you've got here, your approach is fine.