From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13714 invoked by alias); 15 Jul 2014 15:42:35 -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: 32865 Received: (qmail 13588 invoked from network); 15 Jul 2014 15:42:20 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.2 X-DKIM: Sendmail DKIM Filter v2.8.3 velox.its.uu.se 2C2FB34D5C DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=uu.se; s=centralsmtp; t=1405438936; i=@uu.se; bh=psm7QRyrDOvGqC9zBye9u2IFSeVx1RwhNuWbGax37UI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=xAIqPslIACaTMzurYoTxYo+0SxNM9MZCcI7sEnHTT5fUUhji68wY+CGkn+/QaFL9K Bqbnlm9cYg0f94a77XbrqCmt8QwK/BicZOhSJ/mM7jtHeGzpO7fzTB9LKmwQpxTXnC mY5qMvmHpfgsYsm+aeYCWVVDbwW8RptrRQ3iyKNU= From: Emanuel Berg To: Bart Schaefer Cc: zsh-workers@zsh.org Subject: Re: implicit previous command, only state what should change References: <874myk3ocp.fsf@debian.uxu> <140714234638.ZM29435@torch.brasslantern.com> Date: Tue, 15 Jul 2014 17:42:17 +0200 In-Reply-To: <140714234638.ZM29435@torch.brasslantern.com> (Bart Schaefer's message of "Mon, 14 Jul 2014 23:46:38 -0700") Message-ID: <87ha2ibpd2.fsf@debian.uxu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Bayes-Prob: 0.9999 (Score 5, tokens from: outbound, outbound-uu-se:default, uu-se:default, base:default, @@RPTN) X-p0f-Info: os=Linux 2.6.x, link=Ethernet or modem X-CanIt-Geo: ip=130.243.137.27; country=SE; region=Uppsala; city=Uppsala; latitude=59.8667; longitude=17.6333; http://maps.google.com/maps?q=59.8667,17.6333&z=6 X-CanItPRO-Stream: outbound-uu-se:outbound (inherits from outbound-uu-se:default,uu-se:default,base:default) X-Canit-Stats-ID: 0aMqDGgnL - 4d9ca04f3ea4 - 20140715 X-Antispam-Training-Forget: https://mailfilter.sunet.se/canit/b.php?i=0aMqDGgnL&m=4d9ca04f3ea4&t=20140715&c=f X-Antispam-Training-Nonspam: https://mailfilter.sunet.se/canit/b.php?i=0aMqDGgnL&m=4d9ca04f3ea4&t=20140715&c=n X-Antispam-Training-Spam: https://mailfilter.sunet.se/canit/b.php?i=0aMqDGgnL&m=4d9ca04f3ea4&t=20140715&c=s X-CanIt-Archive-Cluster: PfMRe/vJWMiXwM2YIH5BVExnUnw X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.36.171.202 Bart Schaefer writes: > zsh% !:0 user-emacs-directory !:2* Yes, only, if the other arguments (and the command) are short or medium-length words I'd say it is in most cases faster and more comfortable to just retype them. > You can automate this for some simple cases (the > following assumes you are using the default non-vi > key bindings): > > bindkey -s ^X1 '^U!!:0 \e!^ !!:2*^X^X\e!' bindkey -s > ^X2 '^U!!:0-1 \e!^ !!:3*^X^X\e!' bindkey -s ^X3 > ^U!!:0-2 \e!^ !!:4*^X^X\e!' bindkey -s ^X4 '^U!!:0-3 > \e!^ !!:5*^X^X\e!' bindkey -s ^X5 '^U!!:0-4 \e!^ > !!:6*^X^X\e!' > > With this, typing ctrl+x 1 will re-insert the > previous line with the first argument omitted, > leaving the cursor where the new first argument > should be typed. Similarly for ctrl+x 2 through 5, > though they don't work quite ideally if there are no > arguments following the one you're replacing (try it > to see what I mean). OK, get back to you. -- underground experts united