From 59a99ca62596dbb129351b34f451589e83930407 Mon Sep 17 00:00:00 2001 From: Eshan Roy Date: Tue, 19 Nov 2024 09:14:36 +0530 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20perf(usage):=20usage()=20f?= =?UTF-8?q?unction=20is=20more=20informative,=20with=20clearer=20examples?= =?UTF-8?q?=20and=20a=20description=20of=20options?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- usr/bin/launch-terminal | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/usr/bin/launch-terminal b/usr/bin/launch-terminal index 1f6a206..d2c7bf5 100755 --- a/usr/bin/launch-terminal +++ b/usr/bin/launch-terminal @@ -8,9 +8,15 @@ set -euo pipefail # Enable strict error handling LAUNCH_TERMINAL_SHELL=bash usage() { - echo "Usage: ${0##*/} [cmd]" - echo ' -s [shell] Change shell to [shell]' - echo ' -h This help' + echo "Usage: ${0##*/} [options] [command]" + echo + echo "Options:" + echo " -s [shell] Change shell to [shell] (default: bash)" + echo " -h Show this help message" + echo + echo "Example:" + echo " ${0##*/} -s zsh 'echo Hello, World!'" + echo " ${0##*/} -h" exit 1 }