summaryrefslogtreecommitdiff
path: root/src/query.sh
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-31 11:41:23 +0100
committerdavidovski <david@davidovski.xyz>2022-05-31 11:41:23 +0100
commit10a35e3250db3c413e7292fa4d8090a0e61dc5b8 (patch)
tree8a29a041ebea52a4eec6c1f15c6487fd1cf6ce1a /src/query.sh
parent91d36b3760828be97a27f6c1dc61e72075e1e8cd (diff)
removed idea of repos
Diffstat (limited to 'src/query.sh')
-rw-r--r--src/query.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/query.sh b/src/query.sh
index dc3846c..14d9adf 100644
--- a/src/query.sh
+++ b/src/query.sh
@@ -5,10 +5,18 @@ list () {
find ${PACKAGES_DIR} -type f | sed "s,${PACKAGES_DIR}/,,"
}
-list_installed () {
+installed () {
ls -1 ${INSTALLED_DIR}
}
+list_installed () {
+ list | while read -r line; do
+ [ -d ${INSTALLED_DIR}/$line ] \
+ && echo $line "[installed]" \
+ || echo $line
+ done
+}
+
search () {
if [ $# = 0 ]; then
list