Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: command substitution with control chars?
- X-seq: zsh-users 11337
- From: "Matt Wozniski" <godlygeek@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: command substitution with control chars?
- Date: Sun, 25 Mar 2007 15:18:36 -0400
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qZoFtNnjwuSJYadqjeW2JIXechd1/1sKPzflN8Rwq+4qW9Q1nPu53cvxQl9578NTE5ilYrxypIwS5K1zPjhGP+QC1TzJNLLrZ2QFOydo8NkzVYBT2LARzGml3PPJSinNwdOomdp4H5NidMIiPHGIxK4lRyUmYbj7pGTotW+7MF8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=EQIpop7MZv8F57QQFvMwYY234uzhLzAMrDcokYlZkJJGebehhhI4jr0BXrGSUuh96vM7cmFF1p9CMpOiLmQPM+rd/d0k1gEC3qyXKGCrozPXXjUM2GGSJxrwRJ5M2Jp8NoisKPbwNCw+4iUKr2jZt0EB83trvKCr+yIKhHybgUs=
- In-reply-to: <20070325185204.48021.qmail@xxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20070325094407.62594.qmail@xxxxxxxxxxx> <237967ef0703251133y79cde28coaa7a788f0ced8069@xxxxxxxxxxxxxx> <20070325185204.48021.qmail@xxxxxxxxxxx>
On 3/25/07, Atom Smasher wrote:
On Sun, 25 Mar 2007, Mikael Magnusson wrote:
> It sounds like you just need to put your escape sequences inside %{ %}
> pairs?
=====================
then i wind up getting colored "%{" and colored "%}" in the prompt, and
things are still hosed. maybe there's a way to do it, but i haven't
figured it out yet...
Seems to work for me...
The only change I made in the entire script was changing lines like
echo -e "\033[01;34m$state\033[0m "
to
echo -e "%{\033[01;34m%}$state%{\033[0m%} "
and then I did
RPS1="[$(~/downloads/bat_mon.sh)]"
Which gave me
"downloads> [charged ]"
as my prompt, colored cyan, and tab completion worked fine. There's
no need to do anything fancy, like port that script itself to zsh -
just adding %{ %} pairs around escape sequences in the echo -e command
ought to be enough.
~Matt
Messages sorted by:
Reverse Date,
Date,
Thread,
Author