[Patch] regtool: Add load/unload commands and --binary option
Wed Jan 25 23:02:00 GMT 2006
On Wed, 25 Jan 2006, Brian Dessent wrote:
> Christian Franke wrote:
> > At least when regtool is used interactively, it is IMO not very useful
> > to have modem-line-noise-like output for REG_BINARY, but human
> > readable output for the other value types. But this is the current
> > behavior of "regtool get ...".
> Instead of an explicit -b flag, perhaps it should just call isatty() and
> if being run interactively, output human readable hex dump, otherwise
> output raw binary.
What if you want to redirect the hex dump to a file? IMO, isatty() checks
are only useful if the output won't change qualitatively on redirection
(e.g., for coloring). Otherwise, it's always better to use an explicit
That said, attempting to "regtool get" a binary value is no different from
attempting to cat a binary file -- and we're not changing "cat" to output
hex dumps. What would be useful instead is a way to query the type of a
value via regtool. We could also add a "-h" (for --human-readable) flag
to always output the value in human-readable form (see below).
FWIW, 'A=`regtool get KEY1\\VAL`; regtool set KEY2\\VAL "$A"' will already
break for REG_MULTI_SZ type values. It would be good to make regtool's
behavior consistent: "regtool set -f FILE" reads the value from FILE,
which would work for all value types.
|\ _,,,---,,_ firstname.lastname@example.org | email@example.com
ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!)
|,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"
More information about the Cygwin-patches