mirror of https://github.com/octoleo/hosts.git
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.
|
Display help information for ${_ME} or a specified command.
|
||||||
HEREDOC
|
HEREDOC
|
||||||
help() {
|
help() {
|
||||||
if [[ ${#_COMMAND_ARGV[@]} = 1 ]]
|
if [[ -n "${1:-}" ]]
|
||||||
then
|
then
|
||||||
|
desc --get "${1}"
|
||||||
|
else
|
||||||
cat <<HEREDOC
|
cat <<HEREDOC
|
||||||
__ __
|
__ __
|
||||||
/ /_ ____ _____/ /______
|
/ /_ ____ _____/ /______
|
||||||
|
@ -603,8 +605,6 @@ Help:
|
||||||
|
|
||||||
$(commands)
|
$(commands)
|
||||||
HEREDOC
|
HEREDOC
|
||||||
else
|
|
||||||
desc --get "${1}"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue