refactor: standardize help generation
This commit is contained in:
@@ -12,28 +12,3 @@ fn-logs-usage() {
|
||||
echo " -t, --tail # continually stream logs"
|
||||
echo " -q, --quiet # display raw logs without colors, time and names"
|
||||
}
|
||||
|
||||
fn-logs-help-content() {
|
||||
declare desc="return logs plugin help content"
|
||||
cat <<help_content
|
||||
logs <app> [-h] [-t] [-n num] [-q] [-p process], Display recent log output
|
||||
logs:failed <app>, Show the last logs for an application
|
||||
help_content
|
||||
}
|
||||
|
||||
cmd-logs-help() {
|
||||
if [[ $1 == "logs:help" ]]; then
|
||||
echo -e 'Usage: dokku logs[:COMMAND]'
|
||||
echo ''
|
||||
echo 'Output app logs'
|
||||
echo ''
|
||||
echo 'Additional commands:'
|
||||
fn-logs-help-content | sort | column -c2 -t -s,
|
||||
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
|
||||
fn-logs-help-content
|
||||
else
|
||||
cat <<help_desc
|
||||
logs, Output app logs
|
||||
help_desc
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user