From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Jacob Menke <linux.dev25@gmail.com>
Cc: zsh-workers@zsh.org
Subject: Re: Possible issue with Completion/Unix/Type/_date_formats return value
Date: Tue, 26 Jan 2021 23:37:38 +0000 [thread overview]
Message-ID: <20210126233738.GB25751@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <CAB5oL3Z_-jwbGuVWOLrkYmZdUpJbAhJ9aUN6MBdRBY1f9BZR1A@mail.gmail.com>
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?
next prev parent reply other threads:[~2021-01-26 23:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-20 22:43 Jacob Menke
2021-01-26 23:37 ` Daniel Shahaf [this message]
2021-01-28 9:40 ` Jacob Menke
2021-01-28 18:39 ` Daniel Shahaf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210126233738.GB25751@tarpaulin.shahaf.local2 \
--to=d.s@daniel.shahaf.name \
--cc=linux.dev25@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).