mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-11-14 13:07:54 -06:00
Compare commits
2 commits
f97a617ac9
...
c5bc03f497
Author | SHA1 | Date | |
---|---|---|---|
c5bc03f497 | |||
8fb6648e8e |
2 changed files with 1 additions and 39 deletions
35
mkdocs.yml
35
mkdocs.yml
|
@ -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
5
task
|
@ -39,10 +39,7 @@ function task:_help-logo {
|
||||||
}
|
}
|
||||||
|
|
||||||
# ---- do-task boilerplate ----
|
# ---- do-task boilerplate ----
|
||||||
function task:help {
|
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); }
|
||||||
: "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