zsh-users
 help / color / mirror / code / Atom feed
From: Jim <linux.tech.guy@gmail.com>
To: zsh <zsh-users@zsh.org>
Subject: zsh/nearcolor module usage
Date: Mon, 6 Feb 2023 20:53:56 -0600	[thread overview]
Message-ID: <CA+rB6G+PGaYGiOe7UvV4NVofYQ4VrxABFAJVFhyLQw12jMyrpQ@mail.gmail.com> (raw)

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

Hi,

While searching zshall man page for 'color' I came across the nearcolor
module.
This is something I hadn't used before and thought it could be useful.
Unless I missed something, which I may have, I didn't see anything about
how to
use it. The module only talks about loading it. After some google searches
I did
find an example of how to use it involving prompt expansion in an answer by
Stéphane Chazelas ... thanks Stéphane.

URL:
https://unix.stackexchange.com/questions/665370/confused-on-colors-xterm-vs-zsh-how-to-set-xterm-without-breaking-zsh-colors

% print -P '%F{#ABCB8D}text%f'

Question:  Does anyone know any other ways to use nearcolor?  I tried using
the
parameter expansion flag (%) but nothing I tried worked.

As I said, unless I missed something, it would also seem useful to add a
usage
example to the man page along with how to load the module.

BTW, not all virtual terminals seem to use the parameter COLORTERM.
xterm is one that, AFAICT, doesn't. Yet the nearcolor module appears to work
as long as TERM is set correctly.  In my case TERM set to either
xterm-256color
or tmux-256color works. If using the example in the man page, nearcolor
would
never have loaded for xterm.

Regards,

Jim Murphy

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

             reply	other threads:[~2023-02-07  2:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-07  2:53 Jim [this message]
2023-02-07  4:12 ` Bart Schaefer
2023-02-07  4:29   ` Bart Schaefer
2023-02-07  5:10     ` Jim

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=CA+rB6G+PGaYGiOe7UvV4NVofYQ4VrxABFAJVFhyLQw12jMyrpQ@mail.gmail.com \
    --to=linux.tech.guy@gmail.com \
    --cc=linuxtechguy@gmail.com \
    --cc=zsh-users@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).