From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5392 invoked by alias); 2 Jul 2018 05:11:54 -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: 43130 Received: (qmail 7949 invoked by uid 1010); 2 Jul 2018 05:11:54 -0000 X-Qmail-Scanner-Diagnostics: from mail-io0-f182.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.223.182):SA:0(-1.9/5.0):. Processed in 2.000883 secs); 02 Jul 2018 05:11:54 -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=ne9A4vq+IfCvWpIAAhChyBqxQ8fU3cwjOB7ZM6aoB0A=; b=Il0kFR2oloFy+njc3abOhHoT0aiRribeeEYJHv4sFohNE+/mZeJ0Lz4UgTKRzXlKtF o3ho9gohSn8BQmR/BRfkR33k1On0ZjBWlNYfuje9ZQn4Sb6qBYugtkdUBozjJJnW4JjT DzBmk7QgEMfF8jAt23L8X9c3WBOY8+GHx0UhnMSevVBfyaIczH/kbxEliO85SOS7GzuS N8WaitJPbRPvH4zBCI8Qeq+xr3J//yhmGihR1YVEvTRT38EN4KZsxhvCnUPYaIAJld6c 3bSL3r5EX7IWJVbK/2YCnUe2ukE6KoZ5b+/n6sZNsU/FIqGCEqgg4RdGg9hnX2ocgjf5 rRWg== 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=ne9A4vq+IfCvWpIAAhChyBqxQ8fU3cwjOB7ZM6aoB0A=; b=Wkj0jOV2e3dOLZP9Ir/sZLx2JKkFELygoWxkgbcKiEGZSDqIpxrkEXq92kJprtGvrs o5QKvsdHgX5UKO1NXVCcurJ53d5wAFMbaL1juCYCEje5fCzjJ44NN8rxY8WP9584eeMG 5281om0xRYG29qtptMdC+jfu2DfRLMhixIcDsdJIiPzxmb5+mlnnI02EtBGAXLnBIFAN +DJeIbhQTVQKee87qdd49bdJpt8BXDDLWXUH/qQqQy6DyO0x/PB1uJNmmGyOwqroLsLe 4tAg4x5CoeQgCpAtNU91Nw+J7VarxN34i/GDk1ZDdGElVHeZlLXapUHnTTJpPJtos5CN /mUA== X-Gm-Message-State: APt69E1GRf3AbwU5ucxVFxOmGT69Ez5ql6egrAUphpG8i3NnaaRjaAOd Xl1XmJ9slyVgKgfMiZA5j5xd2u3xRuxEKLnVjyE= X-Google-Smtp-Source: AAOMgpebgcz0ARxQyzYb4iyJY5AKty7s8z2cFG3ssezfyre6edgSJSlzzxZBmmFXoOF+snl4e+c3W2zWqO5Y/VWs89Y= X-Received: by 2002:a6b:334f:: with SMTP id z76-v6mr19546507ioz.88.1530508310037; Sun, 01 Jul 2018 22:11:50 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Thayne Date: Sun, 1 Jul 2018 23:11:38 -0600 Message-ID: Subject: Re: Space in interactive menu select To: Mikael Magnusson Cc: zsh workers Content-Type: multipart/alternative; boundary="000000000000254872056ffd3c8e" --000000000000254872056ffd3c8e Content-Type: text/plain; charset="UTF-8" FYI, I'd be happy to help implement a fix if someone pointed me to the right area of the codebase. Thayne McCombs On Sun, Jul 1, 2018 at 9:18 AM Thayne wrote: > 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 >> > --000000000000254872056ffd3c8e--