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

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



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,
Jacob Menke


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