\d does not work on some grep dist

This commit is contained in:
斟酌 鵬兄 2022-08-12 00:35:23 +09:00
parent 981710ae6f
commit ebe160d808

View File

@ -181,7 +181,7 @@ function rbash-list {
echo "Available sources:"
local _k
for i in `__download "$RBASH_REMOTE/api/v1/repos/$RBASH_REPO/contents/$RBASH_PATH/sources/" | jq -r '.[].name'`; do
_k=`echo -n $i | grep -o "^\d\+"`
_k=`echo -n $i | grep -o "^[0-9]\+"`
_RBASH_DICT["s$_k"]=$i
grep -q -e "^rbash_load \"sources/$i\"\$" "$RBASH_CONFIG"
if [ $? -eq 0 ]; then