From c011f03aee937cdd29779f54dc27e5a9e80a373b Mon Sep 17 00:00:00 2001 From: fatalerrors Date: Wed, 15 Apr 2026 17:47:15 +0200 Subject: [PATCH] add missing help --- profile.d/prompt.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/profile.d/prompt.sh b/profile.d/prompt.sh index b468894..14c00e3 100644 --- a/profile.d/prompt.sh +++ b/profile.d/prompt.sh @@ -179,6 +179,24 @@ set_theme() { local theme_dir="${PROMPT_THEME_DIR:-${MYPATH}/profile.d/themes}" + # -- help mode ----------------------------------------------------------- + if [[ "$1" == "-h" || "$1" == "--help" ]]; then + printf "set_theme: Switch the prompt colour theme for the current shell session.\n\n" + printf "Usage: set_theme [options] [theme]\n\n" + printf "Options:\n" + printf " -h, --help Display this help screen\n" + printf " -l, --list List available themes (default when no argument is given)\n\n" + printf "Arguments:\n" + printf " theme Bare theme name (e.g. 'dark') or an explicit path to a .theme file.\n" + printf " Themes are searched in: %s\n" "$theme_dir" + printf " Override with PROMPT_THEME_DIR in profile.conf [prompt].\n\n" + printf "Examples:\n" + printf " set_theme — list available themes\n" + printf " set_theme dark — apply the dark theme\n" + printf " set_theme ~/my.theme — apply a theme by path\n" + return 0 + fi + # -- list mode ----------------------------------------------------------- if [[ $# -eq 0 || "$1" == "-l" || "$1" == "--list" ]]; then printf "Available themes in %s:\n" "$theme_dir"