commit ebe160d80823975dc66d8743b9f496d32aaa13ce
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2022-08-11T15:35:23Z |
| subject | \d does not work on some grep dist |
commit ebe160d80823975dc66d8743b9f496d32aaa13ce
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2022-08-11T15:35:23Z
\d does not work on some grep dist
---
bash/bashrc/rbashrc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bash/bashrc/rbashrc b/bash/bashrc/rbashrc
index 75babfd..b059f8c 100644
--- a/bash/bashrc/rbashrc
+++ b/bash/bashrc/rbashrc
@@ -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