zsh-users
 help / color / mirror / code / Atom feed
From: Jay Levitt <jay.levitt@gmail.com>
To: zsh-users@zsh.org
Subject: zshaddhistory confusion
Date: Mon, 26 Sep 2011 13:11:15 -0400	[thread overview]
Message-ID: <CANSg5mq_7ntWK6XmAih9H0Lx1qUh0fcKARHJhSXwp-4zREXJjA@mail.gmail.com> (raw)

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?


             reply	other threads:[~2011-09-26 17:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-26 17:11 Jay Levitt [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANSg5mq_7ntWK6XmAih9H0Lx1qUh0fcKARHJhSXwp-4zREXJjA@mail.gmail.com \
    --to=jay.levitt@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).