From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10157 invoked by alias); 16 Aug 2015 22:55:10 -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: 36191 Received: (qmail 20041 invoked from network); 16 Aug 2015 22:55:09 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Z/DajeoIGR4Vz2ZlJgXUxArk36W5WDUGenZ9URNGpIQ=; b=pvEVvAhAKzjfJWVfcqK31aC35GcDo4/oqOi1IIXcuvJ4cPfiEz1FKk7sPaHEA2Cpyv WyHIVxg+30SAdwLgXbOxdIXWIklzAtp2UMviHnDk7Wc19U/orLNwhesXgqSIMZvzTeTE pjLn9mk9UH/cKaSZNUM3zrSPCY6NM20GksESOZ80Yj/Gjv4B4goR8bNVztEZrNzHEqpZ UnKWx9qoRh5+jQrFbTuny6Yy45RRv7jMwFwpEAtp5hrXVgiz6WawloR/xdqgp/xsc8No sWSqjy02hFE2Fsr8mAUgpQE9hW0H091sgf3kKbO2n4tVcMniQr4Z8gz32dbYCayM+lHW JfYg== MIME-Version: 1.0 X-Received: by 10.50.110.72 with SMTP id hy8mr12766584igb.36.1439765705397; Sun, 16 Aug 2015 15:55:05 -0700 (PDT) In-Reply-To: References: <20150815000543.GA2043@zira.vinc17.org> <150814190936.ZM17069@torch.brasslantern.com> Date: Mon, 17 Aug 2015 00:55:05 +0200 Message-ID: Subject: Re: incorrect setopt completion From: Mikael Magnusson To: Bart Schaefer Cc: zsh workers Content-Type: text/plain; charset=UTF-8 On Sat, Aug 15, 2015 at 4:14 AM, Mikael Magnusson wrote: > On Sat, Aug 15, 2015 at 4:09 AM, Bart Schaefer > wrote: >> On Aug 15, 2:05am, Vincent Lefevre wrote: >> } >> } zira:~> setopt | grep print >> } printexitvalue >> } >> } "setopt nopri[TAB]" and "unsetopt pri[TAB]" don't give any completion. >> } However "setopt pri[TAB]" has printexitvalue among its completions. >> } This should be the opposite! >> >> Hm. >> >> _main_complete is saving the state of the options as early as it can, >> but XTRACE, PRINTEXITVALUE, LOCALOPTIONS, and LOCALLOOPS are all subject >> to being saved/restored during the execution of shell functions, which >> of course means the entirety of compsys. >> >> There's no way to fix this from shell script code. The state of the >> options will have to be stashed somewhere at the C code level before >> completion functions are entered, if we want this to work. > > I guess I should amend my patch to include all four of these. Actually I just tried this, and all of the other three complete correctly in an interactive shell for me, so I'll leave it as just printexitvalue. -- Mikael Magnusson