Re: [PATCH v2 4/4] completion: be nicer with zsh
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 30, 2012, 19:09 UTC
- Message-ID
- <7vliopatxg.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20120130182547.GA22549@burratino>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 9 quoted lines
> Felipe Contreras wrote: > >> The commands might fail, that's why '2> /dev/null' was used before, >> and ':' is used right now. > > Wait, what? > > : is a no-op command. It does not redirect stderr automatically or > do any other magical thing.
s/no-op/true/ ;-)
> ..., so I suppose consistency is the only reason to > prefer one over another.
Yes. And the script may probably use [[ very heavily.
Early return after || i.e.
A || return
Bsimply looks ugly and misleading, especially when the remainder B is just a single line. But I stopped caring about the styles in this particular script long time ago, so...