zsh-users
 help / color / mirror / code / Atom feed
* precmd() and history
@ 1997-01-08  2:15 Steve Reid
  0 siblings, 0 replies; only message in thread
From: Steve Reid @ 1997-01-08  2:15 UTC (permalink / raw)
  To: zsh-users

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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-01-08  3:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-01-08  2:15 precmd() and history Steve Reid

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).