Artificial intelligent assistant

Tab-completion for Mercurial in Bash? Using Subversion on the command-line, it intelligently tab-completes available subcommands, etc: $ svn c<tab> cat checkout cl co copy changelist ci cleanup commit cp Mercurial, on the other hand, doesn't seem to have tab-completion, at least out of the box: $ hg c<tab> [nothing happens] Is Bash completion for Mercurial available at all? What's the simplest way to get it working? I'm on Ubuntu 11.04.

In Ubuntu 10.04 it works out of the box for me. In bash:


$ hg c
cat checkout clone commit copy


Or in zsh:


$ hg c
cat checkout ci clone co commit copy cp


Perhaps you have a package missing (or you hit a bug).

On my system the completion file is provided by the mercurial package:


$ dpkg -S /etc/bash_completion.d/mercurial
mercurial: /etc/bash_completion.d/mercurial

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy d0c424524139de700d2125b0201f8ac3