This repository has been archived on 2022-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
prezto/modules/git/functions/_git-submodule-remove

28 lines
495 B
Plaintext
Raw Normal View History

#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