diff options
author | Matthew Lemon <chaffinach+git@protonmail.ch> | 2022-01-13 20:18:57 +0000 |
---|---|---|
committer | Matthew Lemon <chaffinach+git@protonmail.ch> | 2022-01-13 20:18:57 +0000 |
commit | 2422775a9a6f7d134f494cf15e23bd7359212cf9 (patch) | |
tree | 39eb26aecfe8007499998992a64db78fae6fff45 /grepjournal | |
parent | 550fcb6248cc60197ce1417cb2960a24851cdceb (diff) |
fixed early-exit bug
Diffstat (limited to '')
-rwxr-xr-x | grepjournal | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/grepjournal b/grepjournal index a6194a7..1ec671a 100755 --- a/grepjournal +++ b/grepjournal @@ -6,7 +6,9 @@ # [[ -z "$2" ]] && [[ -n "$1" ]] && searchterm="$1" # [[ -n "$2" ]] && [[ -n "$1" ]] && searchterm="$1" && flag="$2" -[[ $# -eq 0 ]] && echo "Do grepnotes -h"; exit 1 +if [[ $# -eq 0 ]]; then + echo "Do grepnotes -h"; exit 1 +fi while [[ $# -gt 0 ]]; do if [[ "$1" = "-i" ]]; then |