Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
precmd() and history
- X-seq: zsh-users 587
- From: Steve Reid <steve@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxxx
- Subject: precmd() and history
- Date: Tue, 7 Jan 1997 18:15:10 -0800 (PST)
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;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author