From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4520 invoked from network); 8 Jan 1997 03:06:35 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 8 Jan 1997 03:06:35 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id WAA09557; Tue, 7 Jan 1997 22:07:13 -0500 (EST) Resent-Date: Tue, 7 Jan 1997 21:14:00 -0500 (EST) X-Authentication-Warning: bitbucket.edmweb.com: steve owned process doing -bs Date: Tue, 7 Jan 1997 18:15:10 -0800 (PST) From: Steve Reid To: zsh-users@math.gatech.edu Subject: precmd() and history Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Resent-Message-ID: <"Vkryw3.0.xE2.eBmqo"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/587 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu 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;