Re: [PATCH] completion: zsh: improve bash script loading
Felipe Contreras writes: >> Has this changed since 0a04e187e669 (completion: zsh: improve bash >> script loading, 2013-05-24) which I have on 'pu'? > > Other than this change, nope. > >> If not, I can do this locally to save a roundtrip, if you want. > > Great, let's do that. Done. The diff from 0a04e187e669 looks like this: diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index 9555cf8..fac5e71 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -28,6 +28,7 @@ zstyle -T ':completion:*:*:git:*' tag-order && \ zstyle -s ":completion:*:*:git:*" script script if [ -z "$script" ]; then local -a locations + local e locations=( '/etc/bash_completion.d/git' # fedora, old debian '/usr/share/bash-completion/completions/git' # arch, ubuntu, new debian -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] completion: zsh: improve bash script loading
On Wed, May 29, 2013 at 12:49 PM, Junio C Hamano wrote: > Felipe Contreras writes: > >> On Wed, May 29, 2013 at 1:17 AM, Johannes Sixt wrote: >>> Am 5/29/2013 5:24, schrieb Felipe Contreras: +if [ -z "$script" ]; then + local -a locations + locations=( + '/etc/bash_completion.d/git' # fedora, old debian + '/usr/share/bash-completion/completions/git' # arch, ubuntu, new debian + '/usr/share/bash-completion/git' # gentoo + $(dirname ${funcsourcetrace[1]%:*})/git-completion.bash + ) >>> >>> Won't you need >>> >>> local e >>> >>> here, or does it not matter? >> >> You are right, otherwise it would be in the user's shell. > > Has this changed since 0a04e187e669 (completion: zsh: improve bash > script loading, 2013-05-24) which I have on 'pu'? Other than this change, nope. > If not, I can do this locally to save a roundtrip, if you want. Great, let's do that. -- Felipe Contreras -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] completion: zsh: improve bash script loading
Felipe Contreras writes: > On Wed, May 29, 2013 at 1:17 AM, Johannes Sixt wrote: >> Am 5/29/2013 5:24, schrieb Felipe Contreras: >>> +if [ -z "$script" ]; then >>> + local -a locations >>> + locations=( >>> + '/etc/bash_completion.d/git' # fedora, old debian >>> + '/usr/share/bash-completion/completions/git' # arch, ubuntu, >>> new debian >>> + '/usr/share/bash-completion/git' # gentoo >>> + $(dirname ${funcsourcetrace[1]%:*})/git-completion.bash >>> + ) >> >> Won't you need >> >> local e >> >> here, or does it not matter? > > You are right, otherwise it would be in the user's shell. Has this changed since 0a04e187e669 (completion: zsh: improve bash script loading, 2013-05-24) which I have on 'pu'? If not, I can do this locally to save a roundtrip, if you want. contrib/completion/git-completion.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index 9555cf8..fac5e71 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -28,6 +28,7 @@ zstyle -T ':completion:*:*:git:*' tag-order && \ zstyle -s ":completion:*:*:git:*" script script if [ -z "$script" ]; then local -a locations + local e locations=( '/etc/bash_completion.d/git' # fedora, old debian '/usr/share/bash-completion/completions/git' # arch, ubuntu, new debian -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] completion: zsh: improve bash script loading
On Wed, May 29, 2013 at 1:17 AM, Johannes Sixt wrote: > Am 5/29/2013 5:24, schrieb Felipe Contreras: >> +if [ -z "$script" ]; then >> + local -a locations >> + locations=( >> + '/etc/bash_completion.d/git' # fedora, old debian >> + '/usr/share/bash-completion/completions/git' # arch, ubuntu, >> new debian >> + '/usr/share/bash-completion/git' # gentoo >> + $(dirname ${funcsourcetrace[1]%:*})/git-completion.bash >> + ) > > Won't you need > > local e > > here, or does it not matter? You are right, otherwise it would be in the user's shell. -- Felipe Contreras -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] completion: zsh: improve bash script loading
Am 5/29/2013 5:24, schrieb Felipe Contreras: > +if [ -z "$script" ]; then > + local -a locations > + locations=( > + '/etc/bash_completion.d/git' # fedora, old debian > + '/usr/share/bash-completion/completions/git' # arch, ubuntu, > new debian > + '/usr/share/bash-completion/git' # gentoo > + $(dirname ${funcsourcetrace[1]%:*})/git-completion.bash > + ) Won't you need local e here, or does it not matter? > + for e in $locations; do > + test -f $e && script="$e" && break > + done > +fi -- Hannes -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html