From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6994 invoked by alias); 13 Jul 2016 10:47:09 -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: X-Seq: 38846 Received: (qmail 6674 invoked from network); 13 Jul 2016 10:47:09 -0000 X-Qmail-Scanner-Diagnostics: from mail-qk0-f171.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.220.171):SA:0(0.0/5.0):. Processed in 0.126808 secs); 13 Jul 2016 10:47:09 -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=0.0 required=5.0 tests=FREEMAIL_FROM,SPF_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: mikachu@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.220.171 as permitted sender) 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=m8l1JMm94X/j1d6TIHfAkq6YQ7enHCc5UL1HHJf7VqQ=; b=WKvpZSY6KhChRtaZ1GsJZAPsNK5qKizyqAKP1ip3Me3tfjflzCI+xaNARJWQ374gKP tyndbx7biBDJXMaqyFAcmucKLLhemBzf3REBO0uz/rCMgdsFD+f7OP8q2C/5vn9F1pwx M7f4Z0X9mRtiVCBsgoP9Ar/gFM6wuhxckTVB3C6va0EHg9lLS1bzjVCZplWAa5HGbe+N 0QteVwqgqxvS29fFf1NcP39vt0KSzUKlzze3v5t06XP4yq6Ains0PlvtQ7iAAKTcjslV kxiqEMfOB3rWbcIbwithZ9k9mwKQrvjXyUYYwhVGd4q9vBoMhLOt93wsJ1XPWYVWHoym ESTA== X-Gm-Message-State: ALyK8tKhw9WBAHXEJHxFqZtgxiulxW1snkBfzzxNUR+VElgJ88NhdxyajwGacXGp7TGXSM0xL6HqGuXB8QgCaw== X-Received: by 10.55.25.10 with SMTP id k10mr9091512qkh.27.1468406824489; Wed, 13 Jul 2016 03:47:04 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20160713050033.GA6013@tarsus.local2> References: <20160713050033.GA6013@tarsus.local2> From: Mikael Magnusson Date: Wed, 13 Jul 2016 12:47:04 +0200 Message-ID: Subject: Re: Completion after anonymous function To: Daniel Shahaf Cc: zsh workers Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Jul 13, 2016 at 7:00 AM, Daniel Shahaf wro= te: > =C2=AB() {} =C2=BB completes as a command position: > > % () {} =C2=AB_complete_help=C2=BB > tags in context :completion::complete:-command-:: > commands builtins functions aliases suffix-aliases reserved-words job= s 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] =3D=3D normal ]] =E2=80=94= which > seems correct =E2=80=94 and then the =C2=ABif [[ CURRENT -eq 1 ]]=C2=BB i= n _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. --=20 Mikael Magnusson