summaryrefslogtreecommitdiff
path: root/dmenu_path
diff options
context:
space:
mode:
authorSteph Enders <steph@senders.io>2024-06-24 12:55:19 -0400
committerSteph Enders <steph@senders.io>2024-06-24 12:57:54 -0400
commit8ece84ebc7be995a6b765f290a7920ddef66e358 (patch)
treeb333dc3c58c724e3fe66c8cc57ed91a202d967ec /dmenu_path
parenteba1b09b5b72806d90dc255f3dba1eb573fa9c08 (diff)
update patch: dmenu_omit - refresh cache on dmenu_omit file changeHEADmaster
Regardless of how the dmenu_omit file is edited, if newer than the cache regenerate the cache!
Diffstat (limited to 'dmenu_path')
-rwxr-xr-xdmenu_path3
1 files changed, 2 insertions, 1 deletions
diff --git a/dmenu_path b/dmenu_path
index 4c2a5b4..7f356f5 100755
--- a/dmenu_path
+++ b/dmenu_path
@@ -9,7 +9,8 @@ config="$configdir/dmenu_omitlist"
[ ! -e "$configdir" ] && mkdir -p "$configdir"
IFS=:
-if stest -dqr -n "$cache" $PATH; then
+
+if stest -dqr -n "$cache" $PATH || [ "$config" -nt "$cache" ]; then
stest -flx $PATH | sort -u | grep -wvF -f $config | tee "$cache"
else
cat "$cache"