aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-05-18 20:59:42 +0200
committerDanilo M. <danix@danix.xyz>2026-05-18 20:59:42 +0200
commit24e1b881d468bb381d7b9c6beb8eb212a8c3bb3f (patch)
tree6f73202ea14afac974f5fa6c5cb1247525059711
parent2456315640a9ec33f9f61a13c44a23a69d85d931 (diff)
downloadis-required-24e1b881d468bb381d7b9c6beb8eb212a8c3bb3f.tar.gz
is-required-24e1b881d468bb381d7b9c6beb8eb212a8c3bb3f.zip
Add color legend to -h output
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
-rwxr-xr-xis_required27
1 files changed, 12 insertions, 15 deletions
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 <<EOF
-Usage: $(basename "$0") [OPTIONS] <package>
-
-Show SBo packages that list <package> 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] <package>\n" "$(basename "$0")"
+ printf "\nShow SBo packages that list <package> 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}<package>${C_RESET} queried package name (in header)\n"
+ printf " ${C_CATEGORY}(category)${C_RESET} SBo category of the dependent\n"
exit 0
}