From fac2d8d903330e1ae255803cd2bb1041197a9f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= Date: Fri, 24 Apr 2020 16:38:45 +0200 Subject: [PATCH] Make "Man" function smarter to also work for "lb --help" --- functions/man.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/functions/man.sh b/functions/man.sh index 06b51a7d4..d5cdbb31b 100755 --- a/functions/man.sh +++ b/functions/man.sh @@ -11,9 +11,21 @@ Man () { + local BASENAME + BASENAME=$(basename ${0}) if [ $(which man) ] then - man ${PROGRAM} $(basename ${0}) - exit 0 + case $BASENAME in + $PROGRAM) + man ${PROGRAM} + ;; + *) + man ${PROGRAM} $(basename ${0}) + ;; + esac + else + Echo_warning "man is not installed, falling back to usage output." + Usage fi + exit 0 }