Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: space after completion
- X-seq: zsh-users 23687
- From: Pier Paolo Grassi <pierpaolog@xxxxxxxxx>
- To: Zsh-Users List <zsh-users@xxxxxxx>
- Subject: Re: space after completion
- Date: Fri, 28 Sep 2018 14:51:46 +0200
- 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==
- In-reply-to: <CAP+y1xA3fLVznpJKPQ9i2QmE5RRLvfZ9ACq6o0jc=4W9-L0eTw@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAP+y1xA3fLVznpJKPQ9i2QmE5RRLvfZ9ACq6o0jc=4W9-L0eTw@mail.gmail.com>
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@xxxxxxxxx> 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@xxxxxxxxx
> 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@xxxxxxxxx
linkedin: https://www.linkedin.com/in/pier-paolo-grassi-19300217
founder: https://www.meetup.com/it-IT/Machine-Learning-TO
Messages sorted by:
Reverse Date,
Date,
Thread,
Author