Skip to content

Commit

Permalink
⚡️ perf(usage): usage() function is more informative, with clearer ex…
Browse files Browse the repository at this point in the history
…amples and a description of options
  • Loading branch information
eshanized committed Nov 19, 2024
1 parent 314712f commit 59a99ca
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions usr/bin/launch-terminal
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 59a99ca

Please sign in to comment.