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: Fri, 29 Nov 2019 21:37:07 +0100	[thread overview]
Message-ID: <20191129203707.ipf4zjkkptg35lpa@localhost> (raw)
In-Reply-To: <CAH+w=7ZGsuwPx8jm-mGYqtP6u68kG+-HLkk6fJbaj4rUy+dJVg@mail.gmail.com>

On Fri, Nov 29, 2019 at 11:22:52AM -0800, Bart Schaefer wrote:
> On Fri, Nov 29, 2019 at 9:23 AM zsugabubus
> <zsugabubus@xxxxxxxx> wrote:
> >
> > Though the name clearly states that these are “colors”, but why this
> > artificial limitation? Width measuring happens at the prompts too
> 
> Prompts have the reverse assumption, that everything is nonzero width
> (needs counting) unless special syntax indicates otherwise.  The
> overhead of designating the width of every color element and checking
> whether it is greater than zero doesn't seem worth it, given that
> we're sharing color definitions with other standard apps like "ls" and
> none of THOSE support nonzero-width colors.
> 
> > I really would like it to work
> 
> Chances are there's a different way to do what you are trying to do.
> What's the end goal here?

Recently I completely get rid of terminal file managers because I
realized that they are much-much less powerful than the "plain" shell
could be. I can easily write small functions that do exactly what and
how I need. To keep my message short, I wanted to receive a quick visual
feedback what kind of files I work with. That's where `LS_COLORS` came
into the view. However, if I'm only using 3-4 colors it looks like a
rainbow (more colors can be hardly distinguished and remembered). I even
had no luck with fuzzy finders, because:
- fzf: I can't see the search highlights because of this rainbow
  (everything customize just the one I'd need not... hehh);
- fzy: Doesn't customizable too much;
- skim (fzf in rust): Can set background for search highlights (hurray)
  but fails to correctly display other colors.
So after my success story with colors, I started modifying `LS_COLORS`
to put prefixes before files. It's a way better solution from every
point of view. Programs handle it as much as I need[1], but zsh's
completion fails. .<- Here I'm now.

Personally, I don't care about that few additional microseconds that zsh
takes to parse that hundred 10 chars long string to compute how much
space will it take up on the screen. Maybe, hiding it behind an shell
option?

1: Expect `ls` grid view, but I can live without it.

  reply	other threads:[~2019-11-29 20:37 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 [this message]
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
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=20191129203707.ipf4zjkkptg35lpa@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).