From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-users-return-23687-ml=inbox.vuxu.org@zsh.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, T_DKIM_INVALID 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 885a2181 for ; Fri, 28 Sep 2018 12:52:42 +0000 (UTC) Received: (qmail 17422 invoked by alias); 28 Sep 2018 12:52:29 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23687 Received: (qmail 18635 invoked by uid 1010); 28 Sep 2018 12:52:29 -0000 X-Qmail-Scanner-Diagnostics: from mail-vs1-f44.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.217.44):SA:0(-1.9/5.0):. Processed in 2.133486 secs); 28 Sep 2018 12:52:29 -0000 X-Envelope-From: pierpaolog@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; bh=ym5GJAJwKNaUqEhKLQtHJK1qdqbXXlhlxKYqfJy7CF8=; b=DHfsSkt3ip5s4PgBq+fxxZbhhhgBSbAKnsFFS36oNz+Gj83y6xrPlfnbvbRzCYWT64 DdM+iKlmDSVHlGeG+ggBpw9JFVt6DykDMV1r2lbQUa3TRxeZCIFhf5g+ZgME3uaazPxA ZH/1b2unuzg35UPR4mh/cUAmdob4UKwz6oyGFF41MfAZjozfWJjqFtsuL31prXxlrsth 0EL/+66cRCym7huO/oRQvWkH3jURQkOd4tuxv/DHEZOl9h8KIDoF5VrMipgrov1xOMbj /JDfhJtGhc7P7QZD46Hzj7NvTH/FgbJXwqPEP9joo4tUveyh4CxoZ4jZqFQNqTNSWtmd pk7w== 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; bh=ym5GJAJwKNaUqEhKLQtHJK1qdqbXXlhlxKYqfJy7CF8=; b=NXZZnGfrFzuK5Rdh64lsTotcCWh+q97i+l6JwasbvT++tAeu1DHXrBzXHihTkesoLF ov2zvAjrWzWEdHteQKqpm9b5kaqg2HOnvmHilu0heV+ilWfUoQZBHj5wE6Lmch5Z0nJe XLD+RmnuqZWwEiVO1ih+WuY5cERVXznaveOKCZWmy0NjJ06u0RRS19qyfZr9rnRKze5q P+1TnuNe5fY+2NBrlX/Qh6RJrODviGhTJAd1P4wmQihcgWTCm8d112tNWT16zmLCwVK3 DVZ0jPdI7lwY1WdKQ02HIG7kGoLxPvlCMBBKx3Qn5TCDNRZNGH9Hcj6nAWMqcJwWWtHl ImEA== X-Gm-Message-State: ABuFfohgI6NynMhNTKAHMgZYCJSRC7JAVLMG2vxRgHSD9jfrZCbebGXy +pVT/qR/DY3sygqn1rIJxnVSg5pNgX1EcCwEpfRGCNiP X-Google-Smtp-Source: ACcGV613hpekfWQ8nl+YpIcon+s7D2ZVza3bqs0NY86U021evHHdwK8Mx85FMh90TXoWTTh5xiuxYt9FD1XAjGDfNgM= X-Received: by 2002:a67:3286:: with SMTP id y128-v6mr5205792vsy.57.1538139142665; Fri, 28 Sep 2018 05:52:22 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Pier Paolo Grassi Date: Fri, 28 Sep 2018 14:51:46 +0200 Message-ID: Subject: Re: space after completion To: Zsh-Users List Content-Type: multipart/alternative; boundary="00000000000036be6c0576eded55" --00000000000036be6c0576eded55 Content-Type: text/plain; charset="UTF-8" hello again, I solved it: it was the -S '' in compadd -S '' that was causing the trouble, I removed it and now it adds the space after the completion by itself best Il giorno ven 28 set 2018 alle ore 14:16 Pier Paolo Grassi < pierpaolog@gmail.com> ha scritto: > Hello, I have noticed that when I define a completion function, which does > something like: > > _arguments -s -S -A '-*' \ > "*:commands:->commands" > > case $state in > (commands) > compadd -S '' -V commands -a -Q -U commands_array > ;; > esac > > > (actual code stripped down a bit) > the array commands_array is populated by some code with the "commands" I > want to have completed. > All works well, but when I choose a command the cursor stops right after > the completion, instead of adding a space like _gnu_generic does when I > complete the options. > This way if I press tab again without inserting a space, the command I > choose gets substituted with the first command from the completion menu and > the menu is presented again. > > What would be a good way of achieving the same thing as _gnu_generic? is > there some completion style that can be leveraged here? > > thanks in advance > > -- > Pier Paolo Grassi > email: pierpaolog@gmail.com > linkedin: https://www.linkedin.com/in/pier-paolo-grassi-19300217 > founder: https://www.meetup.com/it-IT/Machine-Learning-TO > -- Pier Paolo Grassi email: pierpaolog@gmail.com linkedin: https://www.linkedin.com/in/pier-paolo-grassi-19300217 founder: https://www.meetup.com/it-IT/Machine-Learning-TO --00000000000036be6c0576eded55--