From e15b81005eb92a5af3b251be0f5fc6acf20afa7d Mon Sep 17 00:00:00 2001 From: Janik von Rotz Date: Tue, 5 May 2026 09:56:28 +0200 Subject: [PATCH] feat(patterns): improve error messaging and clean up help-table comments --- patterns.md | 5 ++++- prompts/convert-help-table-to-dynamic-width.md | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/patterns.md b/patterns.md index efe5d5e..95ea953 100644 --- a/patterns.md +++ b/patterns.md @@ -36,7 +36,10 @@ Check the first param and exit if it is empty. ```bash deploy() { - if [[ -z "$1" ]]; then echo "\$1 is empty."; exit; fi + if [[ -z "$1" ]]; then + echo '$1/path is empty.' + exit + fi ``` ## Prompt for input diff --git a/prompts/convert-help-table-to-dynamic-width.md b/prompts/convert-help-table-to-dynamic-width.md index 386555c..75ed0f9 100644 --- a/prompts/convert-help-table-to-dynamic-width.md +++ b/prompts/convert-help-table-to-dynamic-width.md @@ -9,7 +9,6 @@ help-table() { printf "$column" 'Command' 'Option' 'Description' echo "|$(printf '%*s' $((cmd_width + 2)) '' | tr ' ' '-')|$(printf '%*s' $((opt_width + 2)) '' | tr ' ' '-')|$(printf '%*s' $((desc_width + 2)) '' | tr ' ' '-')|" - # Env printf "$column" 'version' '' 'Show tool versions.' ... } @@ -23,7 +22,6 @@ help-table() { local max_cmd=7 max_opt=6 max_desc=11 rows+=("Command|Option|Description") - # Env rows+=("version||Show version of required tools.") ...