Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: command substitution with control chars?
- X-seq: zsh-users 11338
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: command substitution with control chars?
- Date: Sun, 25 Mar 2007 12:26:19 -0700
- 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 Mar 25, 2:52pm, Atom Smasher 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
Then you have the %{ and %} in the wrong places, or they aren't really
"in the prompt" (as in, in the value of $PS1) at all.
} things are still hosed. maybe there's a way to do it, but i haven't
} figured it out yet...
I suspect "setopt promptsubst" is what you're looking for.
setopt promptsubst
PS1='$(/usr/local/bin/bat_mon.sh)%n@%m:%~%# '
You'll have to edit the bat_mon.sh script to insert the %{ and %} at
the places where it emits the color control sequences.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author