commit 964e832b8634541280d12a41135cf37685fcfff2
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2026-06-26T09:34:27Z |
| subject | Update source location |
commit 964e832b8634541280d12a41135cf37685fcfff2
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2026-06-26T09:34:27Z
Update source location
---
bash/rbashrc | 4 ++--
bash/sources/13_shortcuts_macos | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/bash/rbashrc b/bash/rbashrc
index 9cd618f..55b94be 100644
--- a/bash/rbashrc
+++ b/bash/rbashrc
@@ -141,7 +141,7 @@ function rbash_load {
fi
echo "Load: $1"
- f=`rbash_cache "$RBASH_REMOTE/$RBASH_REPO/raw/branch/master/$RBASH_PATH/$1"`
+ f=`rbash_cache "$RBASH_REMOTE/$RBASH_REPO/raw/master/$RBASH_PATH/$1"`
source "$f"
if [ $? -eq 0 ]; then
echo "echo \"Load: $1\"" >> "$RBASH_MERGED"
@@ -219,7 +219,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
+ for i in `__download "$RBASH_REMOTE/$RBASH_REPO/tree/master/tree.json" | jq -r '.[] | select(.path | startswith("bash/sources")) | .path | sub("^bash/sources/?"; "")'`; do
_k=`echo -n $i | grep -o "^[0-9]\+"`
_RBASH_DICT["s$_k"]=$i
grep -q -e "^rbash_load \"sources/$i\"\$" "$RBASH_CONFIG"
diff --git a/bash/sources/13_shortcuts_macos b/bash/sources/13_shortcuts_macos
new file mode 100644
index 0000000..6640046
--- /dev/null
+++ b/bash/sources/13_shortcuts_macos
@@ -0,0 +1,3 @@
+function pbformat {
+ pbpaste | sed -e "s/ \+$//g" -e "s/ / /g" | pbcopy
+}