From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19860 invoked by alias); 23 May 2015 14:26:33 -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: 20225 Received: (qmail 22449 invoked from network); 23 May 2015 14:26:28 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) 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,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; bh=8tZwSUxuzBRlNHn19rXIedgy28FEnFOOoHuYbCwstLQ=; b=m4ubbF/Au9R4GBIRveKTMgCwC9AM0SWTKJTrxtMJ3z+U7kPonj908QWBVTsQrNFOOu wcatAQRytgXylbDE0C/XzuDTo0o8JL9YzAXN2Nj5dr2586zNY2vvfDID9oqStaebMr+E BcmokRFGioGkC1jWXo5Wavk3lVsi0MisvEg2Ox829qNxbrOaEbtjiN4f/j/T4JLRYF4W UxrYMvb8OhBr1+ZJc4bTgKs96BgiVVyIVavNDaOI9O+SKshOnlMsoRc4EJubpdUq8Xfu abjsAHWnkwoBa9WvAGqUUqWFGwoYnJZfnKzu5cYjaJNhmSw5ripBMO5OgoMdGoVVbfMe PR8Q== X-Received: by 10.180.106.6 with SMTP id gq6mr12316032wib.39.1432390843717; Sat, 23 May 2015 07:20:43 -0700 (PDT) From: Christian Neukirchen To: zsh-users@zsh.org Subject: Finding the first history event of the current instance Date: Sat, 23 May 2015 16:22:28 +0200 Message-ID: <87r3q7nzkr.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Hi, I use INC_APPEND_HISTORY, so every shell instance keeps its own local history and writes it the the global history file as well. Thus, "history" will in general only list the commands I typed into this instance, except if the line is too old and was read from the file. How can I list *only* the history lines that I typed into the current session? For this, it would be enough to find the first event of the new instance, but $HISTCMD is not set at .zshrc yet. Thanks, -- Christian Neukirchen http://chneukirchen.org