2012-09-30 19:53:26 +00:00
|
|
|
#compdef git-submodule-remove
|
|
|
|
#autoload
|
|
|
|
|
|
|
|
#
|
|
|
|
# Completes git-submodule-remove.
|
|
|
|
#
|
|
|
|
# Authors:
|
|
|
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
|
|
|
#
|
|
|
|
|
2018-03-05 08:56:25 +00:00
|
|
|
if ! is-true "$(command git rev-parse --is-inside-work-tree 2> /dev/null)"; then
|
2012-09-30 19:53:26 +00:00
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
local -a submodules
|
|
|
|
local submodule
|
|
|
|
|
|
|
|
while IFS=$'\n' read submodule; do
|
|
|
|
submodules+=("$submodule")
|
|
|
|
done < <(
|
2018-03-05 08:56:25 +00:00
|
|
|
command git config --file "$(git-root)/.gitmodules" --list \
|
2012-09-30 19:53:26 +00:00
|
|
|
| grep '.path=' \
|
|
|
|
| cut -d= -f2-
|
|
|
|
)
|
|
|
|
|
|
|
|
_describe -t submodule 'submodules' submodules && return 0
|