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

Re: Justifying text output



* Bart Schaefer (2004-03-13 07:24 +0100)
> On Mar 13, 12:24am, Thorsten Kampe wrote:
> } Subject: Re: Justifying text output
> }
> } * Bart Schaefer (2004-03-12 11:55 +0100)
> } > 
> } >   echo ${(r:70:):-"${ltgreen}* ${white}compiling $file"}"[ ${ltgreen}ok ${white}]"
> } 
> } I'm sorry but that outputs something like this:
> } *                                                             [ ok ] compiling                                                             [ ok ]                                                                       [ ok ]
> 
> I think you must have gotten some double-quotes or curly-braces in the
> wrong place, somehow.  Or something.
> 
> schaefer[501] file=somerandomstring
> schaefer[502] echo ${(r:70:):-"${ltgreen}* ${white}compiling $file"}"[ ${ltgreen}ok ${white}]"
> * compiling somerandomstring                                          [ ok ]
> schaefer[503]

I figured it out: "setopt shwordsplit" made the "extra spaces" and
"setopt rcexpandparam" made the multiple "[ ok ]". Please advise if
setting them makes sense - meaning making the life of a zsh non-expert
easier or more difficult.

Thorsten



Messages sorted by: Reverse Date, Date, Thread, Author