zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: triviality with prompts
Date: Tue, 02 Dec 2014 20:28:08 -0800	[thread overview]
Message-ID: <547E9158.6050103@eastlink.ca> (raw)
In-Reply-To: <141202190200.ZM31930@torch.brasslantern.com>

On 12/02/2014 07:02 PM, Bart Schaefer wrote:
> On Dec 2,  4:17pm, Ray Andrews wrote:
> }
> } PS3  will permit that variable substitution even without
> } " setopt prompt_subst ", whereas PS1 requires it.
>
> I think you've deluded yourself somehow.  PS3 behaves just like all the
> other prompts.
A red herring there.
I had this form, which seems not to need the option:

PS3=$'\n '"$_red MAKE A SELECTION ... "

... and I changed it to this form, which does need it:
PS3=$'\n $_red MAKE A SELECTION ... '

... whereas in PS1 I had the (what look very much like) single quotes
only version, which does need it, so one seemed to need it, and the
other not.

... so the issue was quote voodoo, as usual.
>
> Once again you're confused about how quoting works.  The variable isn't
> inside single quotes at the time the prompt is expanded.  In fact, in your
> example $'...' is NOT the same as single quotes.
God knows.  If ' ... ' isn't single quotes then is sure has me fooled.  
One day
it will all make sense.  I know everything is different with prompt 
strings tho,
it's a world unto itself where single quotes are not single quotes.
> If you'd read a little further through the scrolls, you'd have seen you
> need neither _red=$'%{\e[1;31m%}' nor prompt_subst:
>
> PS3=$'\n %F{red} MAKE A SELECTION ... %f'
> PS1=$'\n%F{yellow}%l %F{red}%m %F{green}%n %F{blue}%d %F{magenta}%(3L.%L.)$ %f'
There are so many scrolls!  I'll get there.  Anyway, I like my way better.
Even knowing only a tiny bit about the prompt, it is astonishing how much
love went into that.



  reply	other threads:[~2014-12-03  4:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-03  0:17 Ray Andrews
2014-12-03  3:02 ` Bart Schaefer
2014-12-03  4:28   ` Ray Andrews [this message]
2014-12-03  4:38     ` Lawrence Velázquez
2014-12-03 16:20       ` Ray Andrews
2014-12-03 16:43         ` Roman Neuhauser
2014-12-03 17:10           ` Ray Andrews
2014-12-03 17:39             ` Roman Neuhauser
2014-12-03 21:14             ` Bart Schaefer
2014-12-03 23:14               ` Ray Andrews
2014-12-04  5:06                 ` Bart Schaefer
2014-12-04 18:42                   ` Ray Andrews
2014-12-06 21:28                     ` Bart Schaefer
2014-12-07  0:37                       ` Ray Andrews
2014-12-03 21:16         ` Lawrence Velázquez
2014-12-03 21:22         ` Bart Schaefer
2014-12-03 23:40           ` Ray Andrews

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=547E9158.6050103@eastlink.ca \
    --to=rayandrews@eastlink.ca \
    --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).