From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17521 invoked by alias); 1 Jul 2018 15:18:30 -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: 43119 Received: (qmail 12997 invoked by uid 1010); 1 Jul 2018 15:18:29 -0000 X-Qmail-Scanner-Diagnostics: from mail-it0-f50.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(209.85.214.50):SA:0(-1.9/5.0):. Processed in 1.242709 secs); 01 Jul 2018 15:18:29 -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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: astrothayne@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Paev9741qS5Qrh070isnjSM5dDILmWr3xqqhe3YYkZI=; b=t6axwoB7LBHOqYghz6KwxnpcB0Pjk53SII9093nCfARPoCYEG5FRfzkMF6XuEnc4Yc fG0mgASk7IN4Z9mVnDVWbE8nkEaBJ7tuJy2P5OOE//ZNplAc7sweF+CpJeWl3cIgq1u6 Tkvhl/eOleCci8gvkaEok/cz4tcx0WMO4EcDwG/r/X9Z4sghyvUYrkua2kg/9DQ2fLF4 MnTDDweCJeiPBXc0xz4Sa6hMsBMh4pjpVndOTRcbyE4JO6ZyCrRuw+w32KM3MvQ5nVnB y8HvB1V+U5WWHJEWRQ2keA5R9ZjHTBYfymKIys9uDIkrAhbLXomrW4n0rAE6eXTIQgYi fD7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Paev9741qS5Qrh070isnjSM5dDILmWr3xqqhe3YYkZI=; b=STZC8yH3TG8S4nFpa1jFIXJhYkWsgTQtkOu9Vq/RUkqtngKHK7eI8lopszK3Lg2CuU ZhrK5E3K08zhy7in/WHGgKcCHce0JYFCBK22CwEAOzx74+PqhHbChKAOK+5MquBwOrxM K6GuMmDffb/z750aZI2h3uB3a7rPPeMQRsfxi7x4Kz/j62Y+dBZ2LHpXeZSn81UDJatb I+IQQgBk3N1kj7yip1QdsY3MbTyYkOvBBDhfP3kGemsJ0poyXotPVNWlEWWlth2+tAOc 8zKy9GW7j1TJWwtvQDSg24d0ndAXgDSPgTveKmgPdNGbiqw5ypz0mZ4yBdVI9+HPIw/j UWkQ== X-Gm-Message-State: APt69E0KHrnzvKZF6AMIubnuORDAn4tz1mnJUOYNsHsLcj+ebs9HepBj k93qmX7bMxWKWyolP9iCWlBKwppfXBIFXgTth+s= X-Google-Smtp-Source: AAOMgpd4IdRfW6Wqibgn19+HzOV/IR7U6DH8GVd/4vysUH9z/op/WUT+EW1vv8VDNlQZrLGCWARJbGRTOq7G/Kf/4IM= X-Received: by 2002:a24:a701:: with SMTP id a1-v6mr660578itf.129.1530458305695; Sun, 01 Jul 2018 08:18:25 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Thayne Date: Sun, 1 Jul 2018 09:18:14 -0600 Message-ID: Subject: Re: Space in interactive menu select To: Mikael Magnusson Cc: zsh workers Content-Type: multipart/alternative; boundary="000000000000a79411056ff19793" --000000000000a79411056ff19793 Content-Type: text/plain; charset="UTF-8" That's true. It should probably act deferently if the space is quoted or escaped. On Sun, Jul 1, 2018, 03:44 Mikael Magnusson wrote: > On Sun, Jul 1, 2018 at 8:25 AM, Thayne wrote: > > With the following (minimal) .zshrc: > > > > zmodload zsh/complist > > zstyle ':completion:*' menu select yes interactive > > autoload -Uz compinit > > compinit > > > > If I finish the word that is being completed myself, then press space, it > > starts completing for the next word, but if I then accept a completion > for > > that word, it then replaces *both* words that I typed during completion. > > https://asciinema.org/a/189304 shows an illustration of this. > > > > This is very unexpected behaviour. I would expect pressing a space during > > interactive menu selection to stop the current completion and insert a > > space after what has been typed so far. Or at least that is how I would > > like it to happen, but as far as I can tell there isn't a way to > accomplish > > that. > > > > I have tried using `bindkey -M menuselect ' ' self-insert`, but that > > doesn't make a difference. `bindkey -M menuselect ' ' accept-line` makes > it > > so a space is treated the same as enter, which is less surprising, but > is a > > little annoying if I start the completion, realize that the completion > > doesn't have the option I actually need, type the real option, then press > > space. > > > > I've also tried creating a custom zle widget that calls `zle send-break` > > and then `zle self-insert`. And bind space to that widget, but that > doesn't > > work either (it looks like it acts the same as `accept-line`. > > > > This seems like a bug to me. > > You can't really just treat the space key as a special case here, > consider completion inside a quote which won't end the current word. > > -- > Mikael Magnusson > --000000000000a79411056ff19793--