penguin/utils

my env utils

commit 0f834521ddc103dfb77cafa40b99ec453ba8d93f

author斟酌 鵬兄 <tgckpg@gmail.com>
date2022-08-11T15:38:24Z
subjectDo not unsert _RBASH_DICT
commit 0f834521ddc103dfb77cafa40b99ec453ba8d93f
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date:   2022-08-11T15:38:24Z

    Do not unsert _RBASH_DICT
---
 bash/bashrc/rbashrc | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/bash/bashrc/rbashrc b/bash/bashrc/rbashrc
index b059f8c..a5655ad 100644
--- a/bash/bashrc/rbashrc
+++ b/bash/bashrc/rbashrc
@@ -172,12 +172,10 @@ 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