Skip to content

Commit

Permalink
refactor(#103): --help with heredoc
Browse files Browse the repository at this point in the history
  • Loading branch information
jannis-baum committed Jul 30, 2024
1 parent efd41c9 commit d73d5c1
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions viv
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
#!/bin/sh

print_usage() {
echo "usage: viv [--scroll n] file/directory"
echo ""
echo "View file/directory in your browser with Vivify."
echo ""
echo "options:"
echo " --help show this help message and exit"
echo " --version show version information"
echo " -s n, --scroll n for markdown files, scroll so that content at source line n is visible"
cat <<EOF
usage: viv [--scroll n] file/directory
View file/directory in your browser with Vivify.
options:"
--help show this help message and exit"
--version show version information"
-s n, --scroll n for markdown files, scroll so that content at source line
n is visible
EOF
}

if [ "$#" -lt 1 -o "$1" = "-h" -o "$1" = "--help" ]; then
Expand Down

0 comments on commit d73d5c1

Please sign in to comment.