zsh-users
 help / color / mirror / code / Atom feed
From: Steve Reid <steve@edmweb.com>
To: zsh-users@math.gatech.edu
Subject: precmd() and history
Date: Tue, 7 Jan 1997 18:15:10 -0800 (PST)	[thread overview]
Message-ID: <Pine.BSF.3.95.970107175233.293F-100000@bitbucket.edmweb.com> (raw)

I'm having a problem with Zsh 3.0.2 under FreeBSD 2.1.0. It doesn't seem
to honor the hist_ignore_dups or hist_ignore_space options. Also, just
pressing enter will add a blank line to the history.

This only happened when I added the precmd() shell function. I recently
switched from Bash to Zsh, and I used to use the Bash PROMPT_COMMAND
variable to append new history lines and read lines that have been
added. I like to keep the history more-or-less syncronized when I switch
between multiple xterms. 

Any suggestions? My zshenv is below.


# ~/.zshenv - Zsh environment.
export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin
export HOME=/home/steve
PROMPT="%n@%m:%/%# "
SAVEHIST=120
precmd() {
	fc -AI ~$USER/.history;
	fc -R ~$USER/.history;
	# Reset terminal (Lynx 2.6 messes up the cursor keys)
	if [ $TERM = xterm ]; then {
		echo -en "\033>\033[?1;3;4;5l\033[?7;8h";
	} fi;
}                                         
dir() { 
	ls -l $* | more;
}
setopt noclobber correctall auto_menu notify hist_ignore_dups \
	hist_ignore_space hist_no_store;


                 reply	other threads:[~1997-01-08  3:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.BSF.3.95.970107175233.293F-100000@bitbucket.edmweb.com \
    --to=steve@edmweb.com \
    --cc=zsh-users@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).