Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ${...-...} vs ${...:-...}
- X-seq: zsh-workers 14508
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>, "ZSH Workers Mailing List" <zsh-workers@xxxxxxxxxx>
- Subject: Re: ${...-...} vs ${...:-...}
- Date: Mon, 28 May 2001 15:30:01 +0000
- In-reply-to: <000501c0e73a$7d490230$21c9ca95@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <000501c0e73a$7d490230$21c9ca95@xxxxxxxxxxxxxx>
On May 28, 9:53am, Andrej Borsenkow wrote:
} Subject: RE: ${...-...} vs ${...:-...}
}
} > } bor@itsrm2% print ${(%)-%l}
} > } 5679KNTXYZhims
} >
} > ${(%)-%l} is ${-} is $- is the option flags. I can see why this might be
} > baffling, but I don't know what else zsh ought to do.
} >
} Hmm ... output an error message? I mean, ${(...)-} is an $-; but
} ${-blablabla} does not lool like it.
But ${-blablabla} does print an error message:
zsh: bad substitution
The problem with ${(%)-%l} is the leading % sign in the stuff after the
parameter name. Would you expect ${(%)foo%l} to print an error message?
} Or interpret it as the ${...:-...}?
No, that would be wrong too.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author