Code

completion: move private shopt shim for zsh to __git_ namespace
authorJonathan Nieder <jrnieder@gmail.com>
Wed, 27 Apr 2011 21:27:04 +0000 (16:27 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 May 2011 04:08:13 +0000 (21:08 -0700)
commitdad4277529b856bffe07760ac3928d06b5424fdc
tree4036d2d42bfb1adf1f1d4ee0ab3aef5ca9765e01
parent3bee6a4733a1ff03b9cc659ea026c6dc17567d4d
completion: move private shopt shim for zsh to __git_ namespace

Most zsh users probably probably do not expect a custom shopt function
to enter their environment just because they ran "source
~/.git-completion.sh".

Such namespace pollution makes development of other scripts confusing
(because it makes the bash-specific shopt utility seem to be available
in zsh) and makes git's tab completion script brittle (since any other
shell snippet implementing some other subset of shopt will break it).
Rename the shopt shim to the more innocuous __git_shopt to be a good
citizen (with two underscores to avoid confusion with completion rules
for a hypothetical "git shopt" command).

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash