mxcl/homebrew — pull request #18174 by telemachus (2013-03-02 00:08:22+00:00)
Title: `brew untap` without args should be useful too

If you run `brew tap` without arguments, it lists all currently installed
taps. This is a useful default, and doing something useful when the command
is run without arguments is pretty common for Unix tools.

However, if you run `brew untap` without arguments, you get the unfriendly
response: Error: Invalid usage. This is because `brew untap` calls
`tap_args` to parse its arguments, and *that* method errors out with
a pretty stark method.

What I've done here is simply have `brew untap` do the same as `brew tap`:
it shows the currently installed taps. This is especially useful for `brew
untap` since it's a great way to remind yourself of the exact name of the
tap you want to remove.

In order to make this work a bit more cleanly, I refactored some code in
the tap command into a method, so that untap could call it as well. (The
untap command already required the tap command to borrow one of its
methods.)