diff --git a/bash/bashrc/rbashrc b/bash/bashrc/rbashrc index d30c016..89763d0 100644 --- a/bash/bashrc/rbashrc +++ b/bash/bashrc/rbashrc @@ -90,6 +90,10 @@ function __download { fi } +function _indent { + xargs -n1 printf ' %s\n' +} + function rbash_cache { local CACHE_FILE MLINK=$( echo "$1" | md5sum | cut -d' ' -f1 ) @@ -107,7 +111,7 @@ function rbash_cache { # User specific aliases and functions function rbash_load { local f path - echo " $1" + echo "$1" | _indent f=`rbash_cache "$RBASH_REMOTE/$RBASH_REPO/raw/branch/master/$RBASH_PATH/$1"` source "$f" } @@ -165,8 +169,8 @@ function rbash-list { echo This command requires jq. return 1 fi - - __download "$RBASH_REMOTE/api/v1/repos/$RBASH_REPO/$RBASH_PATH/sources/" | jq -r '.[].name' + echo "Available sources:" + __download "$RBASH_REMOTE/api/v1/repos/$RBASH_REPO/contents/$RBASH_PATH/sources/" | jq -r '.[].name' | _indent } export PS1='This is \e[1;3m\e[0m: \w\n\$ '