scwrypts/zsh/lib/utils/credits.zsh

12 lines
314 B
Bash
Raw Normal View History

__CREDITS() {
# scwrypts exclusive ("credits" pulled from README files)
[ ! $SCWRYPTS_ROOT ] && return 0
local COMMAND="$1"
2022-08-10 06:55:27 +00:00
[[ $COMMAND =~ - ]] && COMMAND=$(echo $COMMAND | sed 's/-/--/g')
cd $SCWRYPTS_ROOT
cat ./**/README.md \
| grep 'Generic Badge' \
| sed -n "s/.*Generic Badge.*-$COMMAND-.*(/(/p"
}