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

Re: When local state_descr is needed?



Hi,

On 2016-06-09 17:43, Oliver Kiddle wrote:
> Marko Myllynen wrote:
>>
>> It's a bit unclear to me when local state_descr should be declared.
>> Reading the man page makes me think that it certainly doesn't hurt to
>> do it especially when using the ->string convention but is it in fact
>> needed then to avoid any potential or concrete side-effect?
> 
> _main_complete declares it local so it mostly isn't needed.
> 
> state_descr was added much later so there were many existing functions
> that didn't declare it local. Even before, we've often been lax about
> declaring opt_args.
> 
> I tend to only declare it in functions that reference it.
> I don't think it's really worth patching vast numbers of functions [...]

Thanks, all clear now.

Cheers,

-- 
Marko Myllynen



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