From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7255 invoked by alias); 6 Jun 2017 16:10:57 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 41235 Received: (qmail 4516 invoked from network); 6 Jun 2017 16:10:56 -0000 X-Qmail-Scanner-Diagnostics: from 195.159.176.226 by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(195.159.176.226):SA:0(2.3/5.0):. Processed in 2.74697 secs); 06 Jun 2017 16:10:57 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: ** X-Spam-Status: No, score=2.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: gcszd-zsh-workers@m.gmane.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at m.gmane.org does not designate permitted sender hosts) X-Injected-Via-Gmane: http://gmane.org/ To: zsh-workers@zsh.org From: Leah Neukirchen Subject: History expansion surprisingly sets event designator Date: Tue, 06 Jun 2017 17:50:03 +0200 Message-ID: <87d1ahcdzo.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@blaine.gmane.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Hi, on #zsh we discovered: zsh 5.3.1 (x86_64-unknown-linux-gnu) zsh-5.3.1-0-g06b1b7a (and zsh-5.3.1-204-g62c4169, via danielsh) % zsh -f juno% printf a b c a% juno% echo x y z x y z juno% echo !printf:2!:3 c The first tab expansion will correctly expand to "b", but it changes the event designator to the printf-line, resulting in !:3 expanding to "c", while the typed in line "echo !:3" itself would refer to the previous line, the echo-line, and should result in "z". (Same for tab-expanding the second history reference.) Pressing ^U will not reset this, but pressing ^C will. thx, -- Leah Neukirchen http://leah.zone