Skip to content

Commit

Permalink
Better help text and errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ulmeyda committed Dec 6, 2016
1 parent adb1c30 commit e962fbf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions oil
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,13 @@ function deleteBookmarks {
done
}

# parse command line arguments #
function parseFlags {
projectWebpage="github.com/AndreiUlmeyda/oil"
parsingLibraryError="The method used to parse command line flags is not available on your system, visit $projectWebpage for directions."
helpText="Oil is a command line utility to quickly search, select and open your buku-managed bookmarks in your browser. When invoked with one of the flags -t/--tag, -T/--title, -/--delete it runs in different modes to add tags to/edit the titles of/delete your bookmarks. For a more complete reference visit $projectWebpage."

# check if getopt is available
parsingLibraryError="The method used to parse command line flags is not available on your system, see the github page for directions."
getopt --test > /dev/null
if [[ $? -ne 4 ]]; then
echo "$parsingLibraryError"
Expand All @@ -110,8 +114,6 @@ function parseFlags {
exit 1
fi

helpText="herpderp"

while true; do
case "$1" in
-h|--help)
Expand Down

1 comment on commit e962fbf

@AndreiUlmeyda
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closes #10

Please sign in to comment.