Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Proposed feature: Selectively avoid adding to history (with code)
- X-seq: zsh-workers 27748
- From: Richard Hartmann <richih.mailinglist@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Proposed feature: Selectively avoid adding to history (with code)
- Date: Mon, 22 Feb 2010 18:42:41 +0100
- 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=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author