mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-12-21 10:20:43 -06:00
chore: remove newlines
This commit is contained in:
parent
8fb6648e8e
commit
c5bc03f497
1 changed files with 1 additions and 4 deletions
5
task
5
task
|
@ -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 "$?"
|
||||
|
|
Loading…
Reference in a new issue