zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-workers@zsh.org
Subject: Re: Simulating ZLE_RPROMPT_INDENT=0
Date: Wed, 18 Dec 2013 17:38:53 +0000	[thread overview]
Message-ID: <20131218173853.54435025@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <131218092611.ZM22367@torch.brasslantern.com>

On Wed, 18 Dec 2013 09:26:11 -0800
Bart Schaefer <schaefer@brasslantern.com> wrote:
> Are we sticking with the name ZLE_RPROMPT_INDENT ?  None of the other
> prompt-related variables have "ZLE_" stuck on the front of them, even
> though a number of them are useless when zsh/zle is not loaded.

As we don't have namespaces I think it's safest to use the ZLE_ prefix.

> Is it OK to declare ZLE_RPROMPT_INDENT in params.c or should it go in a
> Zle/*.c file?  zle_params.c is currently limited to parameters that are
> pseudo-local to widget context so this would need special handling.

It doesn't need to be declared at all; it doesn't need to be special.
It just needs to be read and the value used if it happens to be set.
There are plenty of other variables like this.

> In the event that the terminal has no non-destructive move-left sequence,
> should assigning ZLE_RPROMPT_INDENT=0 print a warning?  Should it also
> (or instead) ignore the value and revert to 1 in that case?

Would make more to have another more programmatically useful way of
testing this if we need to, e.g. with echotc or echoti.  See also
below.

> I suppose it should also reset itself upon assignment to TERM.

I'm not sure that's necessary.  The user controls assignment to TERM.
If they want to do something to change the indent at the same time it
can be done in shell code.  We can recommend some if necessary.  I don't
see why this needs to be internal.

pws


  reply	other threads:[~2013-12-18 17:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-18  6:43 Bart Schaefer
2013-12-18  9:27 ` Peter Stephenson
2013-12-18 17:26   ` Bart Schaefer
2013-12-18 17:38     ` Peter Stephenson [this message]
2013-12-18 18:43       ` Bart Schaefer
2013-12-18 19:37         ` Peter Stephenson
2013-12-19  7:33           ` Bart Schaefer
2013-12-19  8:04             ` Bart Schaefer
2013-12-19 20:36             ` Peter Stephenson
2013-12-20  7:28               ` IPDEF5U [was Re: Simulating ZLE_RPROMPT_INDENT=0] Bart Schaefer

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=20131218173853.54435025@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.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).