From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14004 invoked by alias); 6 Jun 2017 16:55:04 -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: 41238 Received: (qmail 29528 invoked from network); 6 Jun 2017 16:55:04 -0000 X-Qmail-Scanner-Diagnostics: from mail-wm0-f49.google.com 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(74.125.82.49):SA:0(2.0/5.0):. Processed in 1.136658 secs); 06 Jun 2017 16:55:04 -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.0 required=5.0 tests=FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: chneukirchen@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 74.125.82.49 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=6FYtFnYDdghejPkz5K2O51d4y4i/9MAOgTy/k28xtmM=; b=B98TarRyFwF3f0Rj8cx0iWW8nZFVBsnautY22LLFa6RxrZhSp9w+PG7blT7icw2Fl/ e7FFpj9AP7Rfz5mckMJatxAf9P8s9P7w01KsusGXW9ElmXAicGl6VCAiaqUXFhQs2lT+ psMinBF6AXiL3lbFThfLhW9rPG8i8DdCDuKKWk2BtUqXuouZPK0PH0UjOHd7IQg7r2ET UpDmoTJC4TRorpDOHqq7YHuj0VH1PeLF60b2nSCTT2QKziyXQbzfJ3bl9I3U956zztyh 7HcI2ZXBH4SXLDjfGFT/u5ZaJKmyJ8MBWIEFAzwmze2UKfoCxvYBliAP2/N3CBXiwsY3 wAIA== X-Gm-Message-State: AODbwcCIGOmxj6wH+q0C6TifRP7i+s32E5SQYouvHi8DUfE8Y4w5tRra 8aTy/ic1ZFpp/g== X-Received: by 10.28.91.80 with SMTP id p77mr12152796wmb.84.1496768098862; Tue, 06 Jun 2017 09:54:58 -0700 (PDT) From: Leah Neukirchen To: Peter Stephenson Cc: zsh-workers@zsh.org Subject: Re: History expansion surprisingly sets event designator References: <87d1ahcdzo.fsf@gmail.com> <20170606174345.6f5b8f04@pwslap01u.europe.root.pri> Date: Tue, 06 Jun 2017 18:54:57 +0200 In-Reply-To: <20170606174345.6f5b8f04@pwslap01u.europe.root.pri> (Peter Stephenson's message of "Tue, 06 Jun 2017 17:43:45 +0100") Message-ID: <874lvtcazi.fsf@vuxu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Peter Stephenson writes: > On Tue, 6 Jun 2017 17:50:03 +0200 > Leah Neukirchen wrote: > >> 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. > > Yes, that's how it works. I haven't understood why you think it's a > problem but I presume you're used to some other shell. If my command line is "echo !:3" before pressing RET, it should always print z, even if I fiddled around with tab expansion during editing. I think this is quite confusing as-is. -- Leah Neukirchen http://leah.zone