Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham
	autolearn_force=no version=3.4.1
X-AuditID: cbfec7f4-f79026d00000418a-a9-56be02580ba7
Date: Fri, 12 Feb 2016 16:03:33 +0000
From: Peter Stephenson <p.stephenson@samsung.com>
To: Bart Schaefer <schaefer@brasslantern.com>,
 Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: vared parse error when ` in prompt string
Message-id: <20160212160333.3247b26c@pwslap01u.europe.root.pri>
In-reply-to: <160212075217.ZM14198@torch.brasslantern.com>
References:
 <CAKc7PVB8nc0U96RiOGZ4wxL1LTYzZtiPMmKTKR1dsGoseEzqfg@mail.gmail.com>
 <160212075217.ZM14198@torch.brasslantern.com>
Organization: Samsung Cambridge Solution Centre
X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu)
MIME-version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7bit
X-Brightmail-Tracker:
 H4sIAAAAAAAAA+NgFrrDLMWRmVeSWpSXmKPExsVy+t/xK7oRTPvCDHYfUbHYP/0hi8XB5odM
	Dkwe91dNYfVYdfADUwBTFJdNSmpOZllqkb5dAlfG0dv32AuWsVfc/jWHtYHxGWsXIyeHhICJ
	xP2WPYwQtpjEhXvr2boYuTiEBJYySqy61cAC4TQwSbSfWcwE4ZxjlFi/uIEdwjnLKNG/8Ckz
	SD+LgKrEjL7tLCA2m4ChxNRNs8HmigiES/yZ8wwsLixgJvHhWQc7iM0rYC+xsGE2WJxTwEpi
	3bluRoihTYwSnRdmgh3IL6AvcfXvJyaIA+0lZl45wwjRLCjxY/I9sGZmAS2JzduaWCFseYnN
	a96CHSQkoC5x4+5u9gmMwrOQtMxC0jILScsCRuZVjKKppckFxUnpuYZ6xYm5xaV56XrJ+bmb
	GCFh/mUH4+JjVocYBTgYlXh4DW7tCRNiTSwrrsw9xCjBwawkwmvQtDdMiDclsbIqtSg/vqg0
	J7X4EKM0B4uSOO/cXe9DhATSE0tSs1NTC1KLYLJMHJxSDYyGy81ETYIEjac17GPauo03f+Zs
	A8t//EvlGu/e1bNj8kr7LOLPLcT1/N1NjpTI8ENC3YJp+z++mvNoSc69oJYL0yfJLw52S6n8
	PWn/MfPv90IE/NVD/Oav9Dh3yU5nvWhVy/ey+oyr9YrmlVcsjh5KeX+Xk/mNXec2+38BOxfs
	2BgZtePzyQglluKMREMt5qLiRADgZpJ3bwIAAA==
X-Seq: zsh-workers 37956

On Fri, 12 Feb 2016 07:52:17 -0800
Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Feb 12, 10:51am, Sebastian Gniazdowski wrote:
> }
> } % vared -cp "Github user name or just \`_local': " user
> } zsh: parse error
> 
> torch% vared -cp "Github user name or just \`_local': " user
> Github user name or just `_local': foo
> torch% setopt PROMPT_SUBST
> torch% vared -cp "Github user name or just \`_local': " user
> zsh: parse error
> Github user name or just `_local': foo

I think the real point, now Bart has pointed out what the problem is, is
that you need to triple backslash the "`", or more simply use a single
quote around the lot together with a single backslash.  With
promptsubst, you need vared to see the backslash before the "`".  Or

vared_prompt='The string I want the user to see'
vared -cp ${(q)vared_prompt} user

(Refer back to http://xkcd.com/1638/ again if you've forgotten.)

pws

