Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Local history
- X-seq: zsh-workers 16268
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Subject: Re: Local history
- Date: Mon, 19 Nov 2001 17:58:03 +0000
- In-reply-to: <16721.1006191392@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <16721.1006191392@xxxxxxx>
On Nov 19, 5:36pm, Peter Stephenson wrote:
} Subject: Re: Local history
}
} Bart Schaefer wrote:
} >
} > local temphist=${TMPPREFIX}hist SAVEHIST=$HISTSIZE
} > HISTFILE=$temphist
} > fc -W # Save internal history
} > local HISTSIZE=0 # Truncate internal history
} > HISTSIZE=$SAVEHIST
} > HISTFILE=~/.zcalc-history
} > fc -R # Read previous zcalc history
} > # do zcalc stuff ...
} > fc -W # Save zcalc history
} > HISTFILE=$temphist
} > fc -R # Reload old history
}
} That should obviously restore the original HISTFILE at the second last
} line.
Oops, well, yes, what's missing is that the second line should be
local HISTFILE=$temphist
Originally I had that in the first `local', but then I decided to stuff
the name of the temp file into it's own variable rather than repeat it
twice, and then forgot to localize the assignment on the second line.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author