zsh-users
 help / color / mirror / code / Atom feed
* zshaddhistory confusion
@ 2011-09-26 17:11 Jay Levitt
  2011-09-27  3:01 ` Benjamin R. Haskell
  0 siblings, 1 reply; 7+ messages in thread
From: Jay Levitt @ 2011-09-26 17:11 UTC (permalink / raw)
  To: zsh-users

In addition to my normal zsh history, I want to write to a
.zsh_history_detail file with comments showing date, pwd, etc.  I'm
trying

function zshaddhistory() {
    print -sr -- ${1%%\n'}
    fc -p .zsh_history_detail
    print -sr "${1%%\n'} ### ${PWD} `date '+%Y-%m-%d %R'`"
}

but it now
  1. writes what looks like a pid into .zsh_history, and
  2. puts both the normal AND the detailed history into .zsh_history_detail.

I am probably misunderstanding the fairly terse zshaddhistory docs.  Any hints?


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-10-06 17:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-26 17:11 zshaddhistory confusion Jay Levitt
2011-09-27  3:01 ` Benjamin R. Haskell
2011-09-27 14:17   ` Bart Schaefer
2011-09-28  4:11     ` Benjamin R. Haskell
2011-10-01 20:44   ` Jay Levitt
2011-10-01 21:24     ` Benjamin R. Haskell
2011-10-02  0:21     ` Geoff Wing

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