Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Justifying text output
- X-seq: zsh-users 7170
- From: Thorsten Kampe <thorsten@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Justifying text output
- Date: Sat, 13 Mar 2004 18:48:36 +0100
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <1mm7og67rpkdy.dlg@xxxxxxxxxxxxxxxx> <1040312105556.ZM22295@xxxxxxxxxxxxxxxxxxxxxxx> <16tfmamy8a3c9.dlg@xxxxxxxxxxxxxxxx> <1040313062454.ZM28736@xxxxxxxxxxxxxxxxxxxxxxx>
- Sender: news <news@xxxxxxxxxxxxx>
* 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