From: Mikael Magnusson <mikachu@gmail.com>
To: Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: zsh workers <zsh-workers@zsh.org>
Subject: Re: Completion after anonymous function
Date: Wed, 13 Jul 2016 12:47:04 +0200 [thread overview]
Message-ID: <CAHYJk3R3jZnF+xSkOwSO+Pmu_uTWO9d8hv0gar7TcPbq9YF6vQ@mail.gmail.com> (raw)
In-Reply-To: <20160713050033.GA6013@tarsus.local2>
On Wed, Jul 13, 2016 at 7:00 AM, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> «() {} <TAB>» completes as a command position:
>
> % () {} «_complete_help»
> tags in context :completion::complete:-command-::
> commands builtins functions aliases suffix-aliases reserved-words jobs parameters (_command_names _autocd)
> commands (_path_commands _command_names _autocd)
> jobs (_jobs _command_names _autocd)
> parameters (_parameters _command_names _autocd)
>
> I guess it should just use _default, like unrecognised command words.
>
> Tracing, _complete sees [[ $compstate[context] == normal ]] — which
> seems correct — and then the «if [[ CURRENT -eq 1 ]]» in _normal is
> entered; I guess that's the problem?
It seems to work fine as long as the body of the anonymous function
isn't either empty or ends with a semicolon, which is probably why
nobody noticed before.
--
Mikael Magnusson
next prev parent reply other threads:[~2016-07-13 10:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-13 5:00 Daniel Shahaf
2016-07-13 10:47 ` Mikael Magnusson [this message]
2016-07-13 17:28 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHYJk3R3jZnF+xSkOwSO+Pmu_uTWO9d8hv0gar7TcPbq9YF6vQ@mail.gmail.com \
--to=mikachu@gmail.com \
--cc=d.s@daniel.shahaf.name \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).