Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Completion after anonymous function
- X-seq: zsh-workers 38846
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Subject: Re: Completion after anonymous function
- Date: Wed, 13 Jul 2016 12:47:04 +0200
- Cc: zsh workers <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=m8l1JMm94X/j1d6TIHfAkq6YQ7enHCc5UL1HHJf7VqQ=; b=XrU7JtaoRWAgR1Nq72ckKugPrnqWCiwujYgi1zRgqWLOQEmyi9mx/OxjnTH8yym7ia LiHDJ+92IL9lP9MC5GJ5wu+9Ajx5b3pzrcdJFwHUTicsec5JW/R5yeHXfe71brIgA55T P/OE2t/W54Tf8oPRC3MiatIQ9yoN8DuRm8uBpMqzypCg/N8XrKSn0Qz4y61dJugBgsBQ gUi1hn1gJz8IHGmiYrRetGNYsQiFvdX9nYjghLGxArz5dP6S6SI6BNGgZXTI3ICBpYkV HcxvfmMbqbcAa9i1NyPLAZcFPym9tcDRZCmAHASyFHQVDbCi7/Lua+e6YYRl5/POnDWB 9Mrg==
- In-reply-to: <20160713050033.GA6013@tarsus.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20160713050033.GA6013@tarsus.local2>
On Wed, Jul 13, 2016 at 7:00 AM, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author