mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-11-16 10:51:12 +00:00
b3c27bb164
to improve performance if git is aliased to hub or other wrappers.
27 lines
510 B
Plaintext
27 lines
510 B
Plaintext
#compdef git-submodule-remove
|
|
#autoload
|
|
|
|
#
|
|
# Completes git-submodule-remove.
|
|
#
|
|
# Authors:
|
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
|
#
|
|
|
|
if ! is-true "$(command git rev-parse --is-inside-work-tree 2> /dev/null)"; then
|
|
return 1
|
|
fi
|
|
|
|
local -a submodules
|
|
local submodule
|
|
|
|
while IFS=$'\n' read submodule; do
|
|
submodules+=("$submodule")
|
|
done < <(
|
|
command git config --file "$(git-root)/.gitmodules" --list \
|
|
| grep '.path=' \
|
|
| cut -d= -f2-
|
|
)
|
|
|
|
_describe -t submodule 'submodules' submodules && return 0
|