diff options
Diffstat (limited to 'src/query.sh')
-rw-r--r-- | src/query.sh | 10 |
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 |