FEATURE REQ: Make alias for --diff-options

Martin Pool martinpool at gmail.com
Wed Sep 14 01:47:21 BST 2005


On 13/09/05, John A Meinel <john at arbash-meinel.com> wrote:
> Jari Aalto wrote:
> > I find it quite demanding to have to type the extra options
> > to diff:
> >
> >    $ bzr diff --diff-options -bwu -C 5
> >
> > This is all good for scripts where GNU --long option names are
> > designed to be used, but for command line use the short forms are
> > needed. Would it be possible to provide shorted form for command line
> > use, something like:
> >
> >    $ bzr diff -o -bwu -C 5
> >               |
> >               extra options to diff follow

Yes, except that as other people noted you'd need to either quote the
options or run them together.  So

  bzr diff -o -bwuC5

Though C5 clashes with -u, so really just 

  bzr diff -o -bwC5

On the other hand -o is pretty standard as --output.  Taking svn's -x
could be good.

Another option is to make diff a special command where all unknown
options are passed through to the underlying diff.  This can be done
fairly easily by overriding Command.run_argv with a version that
passes unknown arguments through to diff.  (Or perhaps better to
change run_argv so subclasses can control what happens to unknown
options?)

That would make diff's options different to other commands, but it's
probably a reasonable tradeoff.

We should also allow you to set preferred diff options in
~/.bazaar/bazaar.ini.  (Is that name OK with everyone?)

-- 
Martin




More information about the bazaar mailing list