mirror of
https://github.com/git/git.git
synced 2026-03-15 03:00:07 +01:00
Merge branch 'sg/completion-updates' into next
* sg/completion-updates: completion: move private shopt shim for zsh to __git_ namespace
This commit is contained in:
@@ -628,12 +628,12 @@ __git_refs_remotes ()
|
||||
__git_remotes ()
|
||||
{
|
||||
local i ngoff IFS=$'\n' d="$(__gitdir)"
|
||||
shopt -q nullglob || ngoff=1
|
||||
shopt -s nullglob
|
||||
__git_shopt -q nullglob || ngoff=1
|
||||
__git_shopt -s nullglob
|
||||
for i in "$d/remotes"/*; do
|
||||
echo ${i#$d/remotes/}
|
||||
done
|
||||
[ "$ngoff" ] && shopt -u nullglob
|
||||
[ "$ngoff" ] && __git_shopt -u nullglob
|
||||
for i in $(git --git-dir="$d" config --get-regexp 'remote\..*\.url' 2>/dev/null); do
|
||||
i="${i#remote.}"
|
||||
echo "${i/.url*/}"
|
||||
@@ -2703,7 +2703,7 @@ complete -o bashdefault -o default -o nospace -F _git git.exe 2>/dev/null \
|
||||
fi
|
||||
|
||||
if [[ -n ${ZSH_VERSION-} ]]; then
|
||||
shopt () {
|
||||
__git_shopt () {
|
||||
local option
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "USAGE: $0 (-q|-s|-u) <option>" >&2
|
||||
@@ -2726,4 +2726,8 @@ if [[ -n ${ZSH_VERSION-} ]]; then
|
||||
return 1
|
||||
esac
|
||||
}
|
||||
else
|
||||
__git_shopt () {
|
||||
shopt "$@"
|
||||
}
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user