[MERGE] Implement --output for diff and cat, added -o as an alias.
Matthieu Moy
Matthieu.Moy at imag.fr
Tue Aug 8 07:28:18 BST 2006
[ Sorry for breaking the thread, my mail server is down, I'm
cut-and-pasting from gmane.org ]
Martin Pool wrote:
> On 7 Aug 2006, Matthieu Moy <Matthieu.Moy <at> imag.fr> wrote:
>> Hi,
>>
>> I've filed a bug, but it might be worth pinging the list too:
>>
>> https://launchpad.net/products/bzr/+bug/55414
>>
>> Branch:
>>
http://www-verimag.imag.fr/~moy/bzr/bzr/bzr.output-option/
<http://www-verimag.imag.fr/%7Emoy/bzr/bzr/bzr.output-option/>
>>
>> 1908: Matthieu Moy 2006-08-06 output as a global option, -o as a short alias
>> 1909: Matthieu Moy 2006-08-06 diff -o FILE implemented
>> 1910: Matthieu Moy 2006-08-06 Implemented -o for "bzr cat"
>> 1911: Matthieu Moy 2006-08-06 fixed import statements
>
> Thanks for the contribution. Can you say a bit more about why adding
>
> the option is justified? It seems like it's two things:
Actually, what happened is that I found myself typing
$ bzr bundle -o file
and found that there were no -o alias (which is very common for unix
commands), so I went and implemened the alias. Afterwards, I thought
"while I'm here, let's do it for cat and diff too", but there's no
strong need behind this.
> 1. Using -o FILE avoids encoding problems caused by sending binaries to
> stdout on Windows.
That's what I understood.
> But I thought John's approach of marking commands
> with the encoding semantics would avoid that?
I leave it up to John to say whether the -o is still needed or not.
> 2. Having a -o option is just useful sometimes?
Just one remark: bzr should be consistant, so either this -o should be
here for cat and diff or it should be removed for bundle IMO (that's
indeed the main reason why I implemented it). If --output is removed,
it should be deprecated quickly, since there's already one release of
bzr which includes it.
Otherwise, writting "foo -o bar" or "foo > bar" is mostly a matter of habit.
One argument in favor of -o is that it's usable by people who don't know how
to use redirections, but ...
--
Matthieu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/bazaar/attachments/20060808/c71547ca/attachment.htm
More information about the bazaar
mailing list