zsh-workers
 help / color / mirror / code / Atom feed
From: zsugabubus <zsugabubus@national.shitposting.agency>
To: zsh-workers@zsh.org
Subject: Re: Funky list-colors
Date: Sat, 7 Dec 2019 21:58:34 +0100	[thread overview]
Message-ID: <20191207205819.ff7scz6ok7ux5dyr@localhost> (raw)
In-Reply-To: <CAH+w=7Y_TDFMU_uEHtEbmAUiNRLs2Ek_NdbhUU9fAzc8ZxAYww@mail.gmail.com>

On Wed, Dec 04, 2019 at 03:27:17PM -0800, Bart Schaefer wrote:
> OK, so what you want here is not to fiddle with the way completion
> applies colors to the grid, but the way it populates the grid with
> file names.
> 
> The first and most straightforward thing you might do is set the
> LIST_TYPES option [...]
>
> If that's not sufficient [...] you should look at the file-patterns
> zstyle...

Thanks, I know about and using both.

> If that's still not enough, then you'll want to create your own
> completion function to manage these files.  "compadd -P prefix ..."
> will attach a prefix to each string added by that call to compadd,
> where that prefix is NOT treated as part of the file name...

I tried it but my input was immediately completed by this prefix.

"ls <Tab>" -> "ls prefix".

If it's the intended behavior, I'm surely not look for this.

> For even more detail you can use something similar to:
>   compadd -o -d labels_array -a filenames_array

It looks wonderful! I think it will work for me. Can I make parts of
labels bold or colored? (Zsh seems to escape escape codes.) Or it's only
doable with "list-colors"?

-- 
zsugabubus

  parent reply	other threads:[~2019-12-07 20:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-29 12:21 zsugabubus
2019-11-29 16:06 ` Bart Schaefer
2019-11-29 17:23   ` zsugabubus
2019-11-29 19:22     ` Bart Schaefer
2019-11-29 20:37       ` zsugabubus
2019-12-04 23:27         ` Bart Schaefer
2019-12-05  7:44           ` Oliver Kiddle
2019-12-05 11:07           ` Sebastian Gniazdowski
2019-12-05 11:19             ` Roman Perepelitsa
2019-12-05 17:40             ` Oliver Kiddle
2019-12-07 20:58           ` zsugabubus [this message]
2019-12-07 21:42             ` Oliver Kiddle

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=20191207205819.ff7scz6ok7ux5dyr@localhost \
    --to=zsugabubus@national.shitposting.agency \
    --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).