Compare commits

...

2 commits

Author SHA1 Message Date
c5bc03f497
chore: remove newlines 2024-01-19 10:20:51 -06:00
8fb6648e8e
docs: remove old mkdocs config 2024-01-19 10:20:39 -06:00
2 changed files with 1 additions and 39 deletions

View file

@ -1,35 +0,0 @@
site_name: viv
site_url: https://viv.dayl.in
repo_url: https://github.com/daylinmorgan/viv
edit_uri: edit/main/docs/
repo_name: daylinmorgan/viv
nav:
- home: index.md
- cli: cli.md
theme:
name: material
logo: https://raw.githubusercontent.com/daylinmorgan/viv/main/assets/logo.svg
favicon: https://raw.githubusercontent.com/daylinmorgan/viv/main/assets/logo.svg
features:
- navigation.tabs
- navigation.indexes
palette:
# Palette toggle for dark mode
- scheme: slate
primary: deep purple
toggle:
icon: material/brightness-4
name: Switch to light mode
# Palette toggle for light mode
- scheme: default
primary: deep purple
toggle:
icon: material/brightness-7
name: Switch to dark mode
markdown_extensions:
- footnotes

5
task
View file

@ -39,10 +39,7 @@ function task:_help-logo {
}
# ---- do-task boilerplate ----
function task:help {
: "Show this help"
echo "do:";w=$(("$(compgen -A function | wc -L)" - 3));while read -r name; do [[ ! $name =~ ^task:_ ]] && [[ $name =~ ^task: ]] && paste <(printf '\033[1;32m%*s\033[0m\n' "$w" "${name#task:}") <(type "$name" | sed -nEe 's/^[[:space:]]*: ?"(.*)";/\1/p'); done < <(compgen -A function)
}
function task:help { : "Show this help"; echo "do:";w=$(("$(compgen -A function | wc -L)" - 3));while read -r name; do [[ ! $name =~ ^task:_ ]] && [[ $name =~ ^task: ]] && paste <(printf '\033[1;32m%*s\033[0m\n' "$w" "${name#task:}") <(type "$name" | sed -nEe 's/^[[:space:]]*: ?"(.*)";/\1/p'); done < <(compgen -A function); }
while read -r name; do [[ $name == "task:$1" ]] && { shift; task="$name"; }; done < <(compgen -A function)
[[ -n "$1" && -z "$task" ]] && printf "\033[1;31m%s\033\0[m is not a task\n" "$1"
"${task:-task:help}" "$@" && exit "$?"