I'm not sure this regex is correct: the character class `[^alias]` means “any character except a, l, i, or s”, so any alias that includes a newline followed by one of these letters will still suffer from the same problem (e.g. `status\nlog`).

Since we only need the names of the aliases, and not their contents, perhaps filtering out the lines that don't begin with `alias.` would be better:

```ruby
git_output(%q( … )).
  lines.
  grep(/^alias\./).
  map { |line| … }
```