From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6906 invoked by alias); 26 Sep 2011 17:11:22 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16433 Received: (qmail 10530 invoked from network); 26 Sep 2011 17:11:21 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.216.171 as permitted sender) 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= MIME-Version: 1.0 Date: Mon, 26 Sep 2011 13:11:15 -0400 Message-ID: Subject: zshaddhistory confusion From: Jay Levitt To: zsh-users@zsh.org Content-Type: text/plain; charset=ISO-8859-1 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?