commit 981710ae6ff664adb482415851a5c77c1712a2e5
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2022-08-11T15:28:02Z |
| subject | Reset _RBASH_DICT in rbash-list |
commit 981710ae6ff664adb482415851a5c77c1712a2e5
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2022-08-11T15:28:02Z
Reset _RBASH_DICT in rbash-list
---
bash/bashrc/rbashrc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/bash/bashrc/rbashrc b/bash/bashrc/rbashrc
index 32398be..75babfd 100644
--- a/bash/bashrc/rbashrc
+++ b/bash/bashrc/rbashrc
@@ -172,9 +172,12 @@ function _require_jq {
fi
}
-declare -A _RBASH_DICT
function rbash-list {
_require_jq || return 1
+
+ unset _RBASH_DICT
+ declare -A _RBASH_DICT
+
echo "Available sources:"
local _k
for i in `__download "$RBASH_REMOTE/api/v1/repos/$RBASH_REPO/contents/$RBASH_PATH/sources/" | jq -r '.[].name'`; do