Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: incorrect setopt completion



On Sat, Aug 15, 2015 at 4:14 AM, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> On Sat, Aug 15, 2015 at 4:09 AM, Bart Schaefer
> <schaefer@xxxxxxxxxxxxxxxx> 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



Messages sorted by: Reverse Date, Date, Thread, Author