Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: command substitution with control chars?



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