mirror of
https://github.com/octoleo/hosts.git
synced 2025-01-01 05:31:49 +00:00
Simplify help
argument handling.
This commit is contained in:
parent
dfcb37b3b6
commit
0c11a1939e
6
hosts
6
hosts
@ -561,8 +561,10 @@ Description:
|
||||
Display help information for ${_ME} or a specified command.
|
||||
HEREDOC
|
||||
help() {
|
||||
if [[ ${#_COMMAND_ARGV[@]} = 1 ]]
|
||||
if [[ -n "${1:-}" ]]
|
||||
then
|
||||
desc --get "${1}"
|
||||
else
|
||||
cat <<HEREDOC
|
||||
__ __
|
||||
/ /_ ____ _____/ /______
|
||||
@ -603,8 +605,6 @@ Help:
|
||||
|
||||
$(commands)
|
||||
HEREDOC
|
||||
else
|
||||
desc --get "${1}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user