Commit: bc26db5d48fa56674ef00574ae0b6459ace36a78 Parent: 17cc56061e392f7a3760fd791e4c8fe0bc162c31 Author: Klemens Nanni Date: Thu, 15 Sep 2016 01:09:50 +0200 Test line count before checking files in check() Diffstat:
M | spm.sh | | | 6 | +++--- |
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/spm.sh b/spm.sh @@ -35,10 +35,10 @@ usage() { } check() { - [ -z "${entry}" ] && usage 'No such entry' - - [ "$(printf '%s' "${entry}" | wc -l)" -gt 0 ] \ + [ $(printf '%s' "${entry}" | wc -l) -gt 0 ] \ && usage "Ambigious keyword. Try 'spm search'" + + [ -z "${entry}" ] && usage 'No such entry' } gpg() {