# Subtle git completion hacks with aliases

1 messages from 2010-02-12 to 2010-02-12. Participants: Ulrik Sverdrup.
Thread: https://gitlist.dev/t/22629

## Ulrik Sverdrup, 2010-02-12 13:40

Subject: Subtle git completion hacks with aliases
Message-ID: <a1b6cb1b1002120540o8ff8f50vec1c7b528d462b8a@mail.gmail.com>
URL: https://gitlist.dev/e/a1b6cb1b1002120540o8ff8f50vec1c7b528d462b8a%40mail.gmail.com

```
Relying on git refusing to use aliases that shadow git commands (and
rightly so), but the git completion script taking them at face value,
we can customize the completion of plumbing and custom scripts.

[alias]
        # Make this plumbing command autocomplete
        count-objects =
        # Make this custom shell script (git-unmerged)  autocomplete
arguments as branches, not paths
        unmerged = log

Given the firm beliefs in the aliases-shadowing-commands question, I
think the above should be pretty safe.

Ulrik

```
