Re: [mr] bash-completion rules

2011-12-26 Thread Joey Hess
Adam Spiers wrote:
 there is a bigger cost - the risk of having a version of the completion
 rules which does not match the version of mr installed.

This is, in practice, not a large problem, and can be dealt with by
distribution integrators.

 There's also a converse argument.  Completion functions are not only
 coupled to the thing they are completing for, but also to the shell's
 completion API.  When the API changes, it's better to have completion
 functions within the shell's distribution, because the shell's
 developers can fix all completion functions to work with the new API
 in one go.

Which is why I would certianly not like to bundle zsh completion
functions with the programs they complete. You have to be a zsh guru to
write them, they have changed a *lot* over the years (I don't recognize
anything in the current dpkg completion that's left from the one I
originally wrote), and upstream is very responsive, to keep the completions
up-to-date.

I suspect that bash completion will head in a similar direction, as they
get reworked to support dynamically loading completions on demand, per
http://thread.gmane.org/gmane.comp.shells.bash.completion.devel/3375

With that said, putting a bash completion in mr now just means a little
probable pain later on, so I'm not strongly opposed. 

The real difficulty in completing mr is that it accepts an arbitrary set
of subcommands, even depending on what repository it's run in. In
practice, I just type abbreviated things like mr up and mr p
instead of reaching for the tab key; happily mr will accept any
nonambiguous abbreviations and can be taught others. :)

-- 
see shy jo


signature.asc
Description: Digital signature
___
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home

[mr] bash-completion rules

2011-12-07 Thread Antonio Ospite
Hi,

I wrote bash-completion rules for mr, I will send a patch if you are
interested but before that I wanted to ask where you like the file to
be placed:

./mr-completion.bash
./contrib/mr-completion.bash
./completion/mr-completion.bash

or where else?

Just out of curiosity: is it intentional that the man page does not
mention the 'help' command in the commands list on the top? I see it
is mentioned in the commands descriptions, tho.

Thanks,
   Antonio

-- 
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?


pgpebOwWmvBt1.pgp
Description: PGP signature
___
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home

Re: [mr] bash-completion rules

2011-12-07 Thread Richard Hartmann
On Wed, Dec 7, 2011 at 16:21, Adam Spiers vcs-h...@adamspiers.org wrote:

 On Wed, Dec 7, 2011 at 2:34 PM, Antonio Ospite osp...@studenti.unina.it 
 wrote:

 or where else?

 Good question - I will probably write zsh completion rules for mr
 at some point too.

For zsh, it's

  /usr/share/zsh/functions/Completion/Unix/_mr

but just send it to zsh-work...@zsh.org once done.


Richard
___
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home