Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: C_BASES option for outputting hex and octal
- X-seq: zsh-workers 12599
- From: Zefram <zefram@xxxxxxxx>
- To: Peter Stephenson <pws@xxxxxxx>
- Subject: Re: PATCH: C_BASES option for outputting hex and octal
- Date: Fri, 11 Aug 2000 21:16:03 +0100 (BST)
- Cc: Zsh hackers list <zsh-workers@xxxxxxxxxxxxxx>
- In-reply-to: <0FZ300DOM3N03H@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> from Peter Stephenson at "Aug 10, 2000 05:11:24 pm"
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Peter Stephenson wrote:
>Does anyone object to my adding options for trivial things like this?
>Because if so they ought to have got the point and given up objecting years
>ago :-/. (I finally got fed up with 0x${$(([#16]$num))##*\#}.)
Wouldn't it be nicer to have $(([#0x]$num)) do the 0x-prefixed output,
or some equivalent syntax? It'd be nicer not to have to fiddle with a
global option to control an essentially local decision.
Hmm. Perhaps a better way to do this kind of syntax would be to have a
flag to say "don't output a radix prefix", so you'd do "0x$(([#16-]$num))"
to get the 0x prefix. This is more flexible too, there are plenty of
situations where you want non-decimal output without any standard prefix.
-zefram
Messages sorted by:
Reverse Date,
Date,
Thread,
Author