aboutsummaryrefslogtreecommitdiff
path: root/dmenu_run
diff options
context:
space:
mode:
Diffstat (limited to 'dmenu_run')
-rwxr-xr-xdmenu_run6
1 files changed, 4 insertions, 2 deletions
diff --git a/dmenu_run b/dmenu_run
index 2747919..a15df0f 100755
--- a/dmenu_run
+++ b/dmenu_run
@@ -5,8 +5,10 @@ if [ ! -d "`dirname "$CACHE"`" ]; then
fi
(
IFS=:
- if [ "`ls -dt $PATH "$CACHE" | head -n 1`" != "$CACHE" ]; then
- lsx $PATH | sort -u > "$CACHE"
+ if ls -d $PATH | stest -q -n "$CACHE"; then
+ for dir in $PATH; do
+ ls $dir | stest -C $dir -fx
+ done | sort -u > "$CACHE"
fi
)
cmd=`dmenu "$@" < "$CACHE"` && exec sh -c "$cmd"