1
0
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
prezto/modules/git/functions/_git-submodule-remove

27 lines
494 B

#compdef git-submodule-remove
#autoload
#
# Completes git-submodule-remove.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
if ! is-true "$(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 < <(
git config --file "$(git-root)/.gitmodules" --list \
| grep '.path=' \
| cut -d= -f2-
)
_describe -t submodule 'submodules' submodules && return 0