From 7f1e24f6f48cb8572f1085dade194a4d5144ed09 Mon Sep 17 00:00:00 2001 From: Ryan Greenup Date: Wed, 15 Jul 2020 04:56:39 +1000 Subject: [PATCH] Trying to figure out how to balance printing help --- bin/cadmus | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/cadmus b/bin/cadmus index dd543a7..5c224d6 100755 --- a/bin/cadmus +++ b/bin/cadmus @@ -102,7 +102,9 @@ arguments () { function NoteFind() { - NoteFind.sh "${@:-}" | xargs xdg-open &> /dev/null + ## If it's more than two lines, the output isn't what's expected, + ## instead is more likely help or a message and so that's what should be returned + NoteFind.sh "${@:-}" | (( "$(wc -l)" > 2 )) && echo "Greater than 2" || echo "Less than two" exit 0 }