zsh-workers
 help / color / mirror / code / Atom feed
From: Eric Cook <llua@gmx.com>
To: Daniel Shahaf <d.s@daniel.shahaf.name>, zsh-workers@zsh.org
Subject: Re: _files' default descriptions of globbed-files and all-files are identical
Date: Wed, 26 Jan 2022 17:06:28 -0500	[thread overview]
Message-ID: <9e40a492-8415-c586-eaa1-a3539caf2c03@gmx.com> (raw)
In-Reply-To: <20220126153005.GC1732@tarpaulin.shahaf.local2>

On 1/26/22 10:30, Daniel Shahaf wrote:

>
> I've discussed this on IRC and Eric did not support the change.  If I
> understand correctly (and I'm not sure I do), Eric'd prefer that the
> completion function would use _path_files instead or that the user would
> set the file-patterns style on a specific context.  Eric, please
> add/correct this as needed.
>
> Cheers,
>
> Daniel

I'll try to be more clear:
My mention of _path_files over the use of _files was me mistakenly thinking
that you had a completer that you /only/ wanted to show files that
_files -g glob matches and when nothing does match, show nothing. which is the
behavior _path_files have; not looping over a preset of patterns as _files does.

Since the question is knowing which group of tags is being presented at the moment
in the minibuffer (though not really explained, i think are called `tab labels'
in man page), i don't think the use of _path_files appropriate since it wouldn't
solve what you want.

 > +  pats=( "${${glob:-*}//:/\\:}:globbed-files:globbed\\ files *(-/):directories:directories" "*:all-files:other\\ files" )
When -g /isn't/ used ${glob:-*} expands to * for that tag label, changing the default
description from `file' to `globbed files'. which is something i don't think that you mean.
unless you invoke _next_tags, you ignore globbed-files and directories in tag-order
or use -g nonmatchingpattern you won't see the all-files tag.

completers have a style:

show-completer
        Tested whenever a new completer is tried.  If it is `true', the completion system  out‐
        puts a progress message in the listing area showing what completer is being tried.  The
        message will be overwritten by any output when completions are found and is removed af‐
        ter completion is finished.


that i think could be a way of showing which tag label is being tried, if the user
desired to know (show-taglabel or whatever). which is more generic than just
changing _files behavior.






  reply	other threads:[~2022-01-26 22:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-26 15:30 Daniel Shahaf
2022-01-26 22:06 ` Eric Cook [this message]
2022-01-26 22:15   ` Eric Cook
2022-01-27 10:09 ` Peter Stephenson

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=9e40a492-8415-c586-eaa1-a3539caf2c03@gmx.com \
    --to=llua@gmx.com \
    --cc=d.s@daniel.shahaf.name \
    --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).