Skip to content

Commit

Permalink
style: Improve formatting and consistency in help message function
Browse files Browse the repository at this point in the history
  • Loading branch information
wajeht committed Jul 17, 2024
1 parent 1ce1dea commit 192f501
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ $ curl -s http://commit.jaw.dev/commit.sh | sh -s -- --no-verify
$ curl -s http://commit.jaw.dev/commit.sh | sh -s -- --no-verify --verbose
$ curl -s http://commit.jaw.dev/commit.sh | sh -s -- -nv -v
$ curl -s http://commit.jaw.dev/commit.sh | sh -s -- -v
$ curl -s http://commit.jaw.dev/commit.sh | sh -s -- -h
$ curl -s http://commit.jaw.dev/commit.sh | sh
```

Expand Down
14 changes: 7 additions & 7 deletions src/commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ VERBOSE=false
NO_VERIFY=false

show_help() {
echo -e "${GREEN}Usage: commit.sh [options]${NC}"
echo
echo -e "${YELLOW}Options:${NC}"
echo -e " ${GREEN}-v, --verbose${NC} Enable verbose output"
echo -e " ${GREEN}-nv, --no-verify${NC} Skip message selection"
echo -e " ${GREEN}-h, --help${NC} Display this help message"
echo
printf "${GREEN}Usage: commit.sh [options]${NC}\n"
printf "\n"
printf "${YELLOW}Options:${NC}\n"
printf " ${GREEN}-v, --verbose${NC} Enable verbose output\n"
printf " ${GREEN}-nv, --no-verify${NC} Skip message selection\n"
printf " ${GREEN}-h, --help${NC} Display this help message\n"
printf "\n"
exit 0
}

Expand Down

0 comments on commit 192f501

Please sign in to comment.