From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id a4c77fbc for ; Thu, 8 Nov 2018 02:21:55 +0000 (UTC) Received: (qmail 20256 invoked by alias); 8 Nov 2018 02:21:40 -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: List-Unsubscribe: X-Seq: 43803 Received: (qmail 27901 invoked by uid 1010); 8 Nov 2018 02:21:40 -0000 X-Qmail-Scanner-Diagnostics: from firebrick.maple.relay.mailchannels.net 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(23.83.214.59):SA:0(-2.0/5.0):. Processed in 2.408449 secs); 08 Nov 2018 02:21:40 -0000 X-Envelope-From: wayne@opencoder.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Sender-Id: dreamhost|x-authsender|dropbox@opencoder.net X-Sender-Id: dreamhost|x-authsender|dropbox@opencoder.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|dropbox@opencoder.net X-MailChannels-Auth-Id: dreamhost X-Quick-Shelf: 4e6328532f592e7c_1541642346426_3795127433 X-MC-Loop-Signature: 1541642346426:817473028 X-MC-Ingress-Time: 1541642346425 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=opencoder.net; h= mime-version:references:in-reply-to:from:date:message-id:subject :to:cc:content-type; s=opencoder.net; bh=TVAzTD3Oj6TXcQa5qxBZC0g 5LpU=; b=H88/pwwWZRXX5uEDZluGR4wMjXMp5iDbUX18SwTaGS7AVE1XC07H3ip J1XOB/OaaWYYBr8xzv1LQn9yCP8f6kDUz9QBWikinOFpLoIX1+lkZC/xPLSKRSUx onIvSpCM4Capbw2LNQKRRb8Hi7SFt4heWGwtaQsJrQbFGU92sJfY= X-Gm-Message-State: AGRZ1gKMFho2XkhCU+PwydynOWpsqY6b1G3WqAPdZ1NjB0xZNdRiTlMZ naicGCXP8fzc+pAGrlSxe7VtATjnfEecMOiUHnE= X-Google-Smtp-Source: AJdET5eJIQ9ITEv06IyI4Vu30sACghGVZ1ayqUoJoujCVqBFdheOaWyXN/9P3fHG8NilS8AFIIChKrzpT59sBT9MYL8= X-Received: by 2002:aca:d886:: with SMTP id p128-v6mr1563253oig.346.1541642344229; Wed, 07 Nov 2018 17:59:04 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: X-DH-BACKEND: pdx1-sub0-mail-a15 From: Wayne Davison Date: Wed, 7 Nov 2018 17:58:52 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: A weird smart-insert-last-word bug To: Bart Schaefer Cc: Zsh list Content-Type: multipart/alternative; boundary="0000000000004c784d057a1d9406" X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrkedtgdegudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpeggfhgjhfffkffuvfgtsegrtderredttdejnecuhfhrohhmpeghrgihnhgvucffrghvihhsohhnuceofigrhihnvgesohhpvghntghouggvrhdrnhgvtheqnecuffhomhgrihhnpeiishhhrdhorhhgnecukfhppedvtdelrdekhedrudeijedrudejudenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlqdhoihduqdhfudejuddrghhoohhglhgvrdgtohhmpdhinhgvthepvddtledrkeehrdduieejrddujedupdhrvghtuhhrnhdqphgrthhhpeghrgihnhgvucffrghvihhsohhnuceofigrhihnvgesohhpvghntghouggvrhdrnhgvtheqpdhmrghilhhfrhhomhepfigrhihnvgesohhpvghntghouggvrhdrnhgvthdpnhhrtghpthhtohepiihshhdqfihorhhkvghrshesiihshhdrohhrghenucevlhhushhtvghrufhiiigvpedt --0000000000004c784d057a1d9406 Content-Type: text/plain; charset="UTF-8" On Fri, Nov 2, 2018 at 5:37 PM Bart Schaefer wrote: > Sorry, what is "zlewidget" exactly? > Oops. I got it from Peter a long time ago: https://www.zsh.org/mla/users/2014/msg00270.html My version has been modified to allow an empty KEY value to be able to avoid the bindkey at the end: function zlewidget # KEY WIDGET [FUNCTION] { # bindkey KEY to new WIDGET, possibly implemented by optional FUNCTION. # FUNCTION defaults to WIDGET and will be marked for autoload -Uz. # If KEY is an empty string, the bindkey call is skipped. local key=$1 local widget=$2 local func=${3:-$2} autoload -Uz $func zle -N $widget $func [[ -z $key ]] || bindkey $key $widget } Does this help? [... patch elided ...] > Yup, that works well for me. Thanks! ..wayne.. --0000000000004c784d057a1d9406--