mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-11-14 21:17:54 -06:00
Compare commits
No commits in common. "c5bc03f497dc99b1401923ca9abb1b26b41c80b9" and "f97a617ac9cdb6fea4f51ce04191eca3126952e5" have entirely different histories.
c5bc03f497
...
f97a617ac9
2 changed files with 39 additions and 1 deletions
35
mkdocs.yml
Normal file
35
mkdocs.yml
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
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
5
task
|
@ -39,7 +39,10 @@ function task:_help-logo {
|
||||||
}
|
}
|
||||||
|
|
||||||
# ---- do-task boilerplate ----
|
# ---- 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)
|
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"
|
[[ -n "$1" && -z "$task" ]] && printf "\033[1;31m%s\033\0[m is not a task\n" "$1"
|
||||||
"${task:-task:help}" "$@" && exit "$?"
|
"${task:-task:help}" "$@" && exit "$?"
|
||||||
|
|
Loading…
Reference in a new issue