zsh-workers
 help / color / mirror / code / Atom feed
From: Jacob Menke <linux.dev25@gmail.com>
To: zsh-workers@zsh.org
Subject: Possible issue with Completion/Unix/Type/_date_formats return value
Date: Wed, 20 Jan 2021 17:43:31 -0500	[thread overview]
Message-ID: <CAB5oL3Z_-jwbGuVWOLrkYmZdUpJbAhJ9aUN6MBdRBY1f9BZR1A@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 656 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 887 bytes --]

             reply	other threads:[~2021-01-20 22:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-20 22:43 Jacob Menke [this message]
2021-01-26 23:37 ` Daniel Shahaf
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=CAB5oL3Z_-jwbGuVWOLrkYmZdUpJbAhJ9aUN6MBdRBY1f9BZR1A@mail.gmail.com \
    --to=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).