[BUGFIX] function names duplicated

This commit is contained in:
yage 2022-01-16 13:10:00 -07:00
parent 001bea8406
commit 854e69c134
2 changed files with 2 additions and 3 deletions

View File

@ -5,7 +5,7 @@
# #
###################################################################
_CA__VERSION=1.0.2
_CA__VERSION=1.0.3
_CA__DEPENDENCIES=(code-activator fzf jq git)
#####################################################################

View File

@ -48,9 +48,8 @@ _CA__CUSTOM_ENV_GET_VARIABLE_NAMES() {
_CA__CUSTOM_ENV_GET_FUNCTION_NAMES() {
{
grep -- '^function ' $_CA_ENV | sed 's/function //'
grep -- '[^ #]*()' $_CA_ENV
} | sed 's/().*//' | sort -u
} | sed 's/().*//; s/^function //' | sort -u
}
_CA__CUSTOM_ENV_GET_RESTORE_NAMES() {