From 24e1b881d468bb381d7b9c6beb8eb212a8c3bb3f Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 18 May 2026 20:59:42 +0200 Subject: Add color legend to -h output Co-Authored-By: Claude Sonnet 4.6 --- is_required | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'is_required') diff --git a/is_required b/is_required index f64c95f..857290f 100755 --- a/is_required +++ b/is_required @@ -20,21 +20,18 @@ else fi usage() { - cat < - -Show SBo packages that list in their REQUIRES field. - -Options: - -i show only installed dependents - -u show only uninstalled dependents - -r recursive: also find what requires those packages (one level) - -h this help - -Symbols: - [I] installed on this system - [ ] not installed -EOF + printf "Usage: %s [OPTIONS] \n" "$(basename "$0")" + printf "\nShow SBo packages that list in their REQUIRES field.\n" + printf "\nOptions:\n" + printf " -i show only installed dependents\n" + printf " -u show only uninstalled dependents\n" + printf " -r recursive: also find what requires those packages (one level)\n" + printf " -h this help\n" + printf "\nSymbols and colors:\n" + printf " ${C_INSTALLED}[I] installed${C_RESET} package is present in %s\n" "$PKG_LOG" + printf " ${C_MISSING}[ ] missing${C_RESET} package is not installed\n" + printf " ${C_TARGET}${C_RESET} queried package name (in header)\n" + printf " ${C_CATEGORY}(category)${C_RESET} SBo category of the dependent\n" exit 0 } -- cgit v1.2.3