From bb4424df072332243890714b055e978a5c70adf3 Mon Sep 17 00:00:00 2001 From: Connor Lane Smith Date: Sat, 19 Nov 2011 19:54:55 +0100 Subject: replace lsx with stest --- dmenu_run | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'dmenu_run') 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" -- cgit v1.2.3 From 8cc28cb4265b0c088ea909e58f42342b2214722e Mon Sep 17 00:00:00 2001 From: Connor Lane Smith Date: Sun, 27 Nov 2011 23:35:09 +0100 Subject: simplify stest --- dmenu_run | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'dmenu_run') diff --git a/dmenu_run b/dmenu_run index a15df0f..e0a3e13 100755 --- a/dmenu_run +++ b/dmenu_run @@ -5,10 +5,8 @@ if [ ! -d "`dirname "$CACHE"`" ]; then fi ( IFS=: - if ls -d $PATH | stest -q -n "$CACHE"; then - for dir in $PATH; do - ls $dir | stest -C $dir -fx - done | sort -u > "$CACHE" + if stest -dqr -n "$CACHE" $PATH; then + stest -flx $PATH | sort -u > "$CACHE" fi ) cmd=`dmenu "$@" < "$CACHE"` && exec sh -c "$cmd" -- cgit v1.2.3