Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zshaddhistory confusion
- X-seq: zsh-users 16433
- From: Jay Levitt <jay.levitt@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: zshaddhistory confusion
- Date: Mon, 26 Sep 2011 13:11:15 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=ifpsgnCdbpFWgi/qDDecZHL/Xcl1FzoLDoow3C0JT5Q=; b=Dyz4iEW15id+1zeQjULDnX8WQtY5mUZiRENyYsymG266aJ/HiWBEj7g4f95bTgx1YC kBTi1ze7viogiNIf4IG6l8BlNDW/HSeTDjOHodjxWBsbZzWrG12N/3ZnE6LwelrSO2gN XfbLv8R9xkVC0vnmZfZ+Mm2bUn23QbAmZPRUI=
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author