aboutsummaryrefslogtreecommitdiff
path: root/show
diff options
context:
space:
mode:
Diffstat (limited to 'show')
-rwxr-xr-xshow10
1 files changed, 6 insertions, 4 deletions
diff --git a/show b/show
index 86ece43..3db4ac5 100755
--- a/show
+++ b/show
@@ -21,6 +21,8 @@ function __update_filelist {
if [ -z "$ITEM" ]; then
echo "usage: $BASENAME <item-name>"
exit 1
+elif [ "$ITEM" == "refresh" ]; then
+ __update_filelist
elif [ ! -d "$DOCS" ]; then
echo "missing $DOCS folder"
exit 1
@@ -34,10 +36,10 @@ else
CHANGED="`stat --printf='%Y\n' $LIST`"
fi
-# Refresh lists older than $MAX_AGE
-if ((($DATE - $CHANGED) >= $MAX_AGE)); then
- __update_filelist
-fi
+# Automatically refresh lists older than $MAX_AGE
+#if ((($DATE - $CHANGED) >= $MAX_AGE)); then
+# __update_filelist
+#fi
# Dispatch
#find $DOCS -iname "*$ITEM*" | head -1 | while read entry; do xdg-open "$entry"; done