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

Re: Possible issue with Completion/Unix/Type/_date_formats return value



Jacob Menke wrote on Wed, Jan 20, 2021 at 17:43:31 -0500:
> Hello,
> 
> I was wondering if _date_formats has an improper return value.
> 
> When called from _date (when $1 is unset, thus $1 == zsh is
> false) _date_formats always returns 1 even when matches are generated from
> _describe.  This causes completion to continue erroneously.
> 
> Last two lines are shown:
> _describe -t date-format-specifier 'date format specifier' specs 
>     -p "${(Q)PREFIX:-%}" -S ''
> [[ $1 == zsh ]] && _message -e date-format-precision 'precision for %%.(1-9)'
> 
> I believe the return value of _describe should be returned either by making
> _describe last statement or storing its value in local var ret and then
> returning ret.

Thanks for the report and sorry for the late answer.  I agree that it's wrong
as it stands.  Anyone wants to take it from here?




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