From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6019 invoked by alias); 22 Feb 2010 17:42:48 -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: 27748 Received: (qmail 6792 invoked from network); 22 Feb 2010 17:42:47 -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,DKIM_SIGNED, DKIM_VERIFIED autolearn=ham version=3.2.5 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.218.227 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=TSe7xV9zZge/Uxydc4FzaevGM5SoIfxBhwhuGVpKy9c=; b=P4F83ZAeGUXsPTFEic1/ebs7qDa0hrB43D9bld2AgVEKWH6qmjJMr1RkHQ5bln2uMU oNKdHdGGWSpDXN+VA9yeSNsSMf+Qr8ljCYkYE/Yf2widky+fvkY3bAroZU+smYh2oH+J +7QDKz1/QNSmZ4jV+pk2nIxeI8m58HHwxUXek= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=xUoVL2ucXIqZbAWQLR14CZ1j3nn7Qc/PJ7Z7poN8Zk4KmkRwGPfrGgdzPMLi0QAqsw W1PsR84uefBf4OY3ExNpaPQTGauMRYBA6IqCMTNkXDGiuDDeyB6L5GemwS99hVlb+if8 NcQxevdQe9Xytk5Za8yV2r4lehNzm86G57DIE= MIME-Version: 1.0 Date: Mon, 22 Feb 2010 18:42:41 +0100 Message-ID: <2d460de71002220942y27ad63acxa3df7a9838ace0b8@mail.gmail.com> Subject: Proposed feature: Selectively avoid adding to history (with code) From: Richard Hartmann To: zsh-workers@zsh.org Content-Type: text/plain; charset=UTF-8 Hi all, I am running this function. It's a bit like HIST_IGNORE_SPACE just without leading whitespace. zshaddhistory(){if [[ -n $FOO ]]; then return 1; fi} If you set $FOO, you will not save anything to your history. If you unset it, you will save again. 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. The control variable is deliberately named $FOO because I wanted to ask: 1) If anyone else thinks this is useful and if it should be a _function 2) If "$HIST_NO_STORE" is a good variable name 3) If this would be better handled in an option Thanks, Richard