From 9c02706d857661ca68351ad932b129150db1bfe0 Mon Sep 17 00:00:00 2001 From: davidovski Date: Mon, 28 Feb 2022 10:56:12 +0000 Subject: fixed search giving error for no query --- src/query.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/query.sh') diff --git a/src/query.sh b/src/query.sh index 1da2e2f..c13cbcf 100644 --- a/src/query.sh +++ b/src/query.sh @@ -10,7 +10,11 @@ list_installed () { } search () { - list | grep $(echo $@ | sed "s/ /\\|/g") + if [ $# = 0 ]; then + list + else + list | grep $(echo $@ | sed "s/ /\\|/g") + fi } files () { -- cgit v1.2.1