From 0c11a1939e54b0bfb8629d5e90d90f5e3db757a5 Mon Sep 17 00:00:00 2001 From: William Melody Date: Mon, 14 May 2018 21:19:36 -0700 Subject: [PATCH] Simplify `help` argument handling. --- hosts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hosts b/hosts index 952aaa7..004b37c 100755 --- a/hosts +++ b/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 <