zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: tab completion color inversion
Date: Fri, 8 Jul 2016 10:47:29 -0700	[thread overview]
Message-ID: <160708104729.ZM27890@torch.brasslantern.com> (raw)
In-Reply-To: <55898.1467933681@hydra.kiddle.eu>

On Jul 8,  1:21am, Oliver Kiddle wrote:
}
} You can get the same, completion altering attributes
} effect, with PROMPT='%S%U%Bhello%b '

Presumably it's intentional that reaching the end of the prompt string
does not implicitly reset all the %S %U etc. attributes?  E.g., meant
to be combined with ( preexec() { print -nP %u%s } ) or similar.

Using that prompt I can still get effects where the %S%U ends in the
middle of a command line after completing.  I don't think this is a
bug, per se, because leaving the attributes hanging open like that is
not exactly documented behavior, but it might argue that they should
be implicitly turned off.

(I think completion always resets the attributes, but sometimes ZLE
reprints the whole prompt which turns them back on again.)

} txtchangep and txtattrmask seem to be doing much the same thing -
} tracking the current attributes. The need for tracking attributes that
} have been turned off such as TXTNOBOLDFACE seems a bit odd - wouldn't
} the absence of TXTBOLDFACE do the job?

You've stated most of my confusion over this, quite succinctly.  My
only guess is that one represents a temporary state change from the
more persistent state of the other, but I haven't worked out how that
plays or which is which.

} I've not done that then but I did put the AND before the OR.

In thinking about this further, swapping the AND and OR subexpressions
does change the semantics when the same bit is present in both X and Y.
Maybe that never comes up.


  reply	other threads:[~2016-07-08 17:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CACW6SB6sRKdtsbFe_ikp1zqP3YRd9grq-xABMGutu4fRvCqM2A@mail.gmail.com>
     [not found] ` <49130.1467902941@hydra.kiddle.eu>
2016-07-07 17:01   ` Bart Schaefer
2016-07-07 23:21     ` Oliver Kiddle
2016-07-08 17:47       ` Bart Schaefer [this message]
2016-07-08 22:00         ` 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=160708104729.ZM27890@torch.brasslantern.com \
    --to=schaefer@brasslantern.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).