repo: dmenu action: blob revision: path_from: dmenu_path revision_from: refs/heads/trunk: path_to: revision_to:
blob of:
/ dmenu_path
refs/heads/trunk:/dmenu_path
#!/bin/sh
cachedir="${XDG_CACHE_HOME:-"$HOME/.cache"}"
cache="$cachedir/dmenu_run"
if [ "$1" = "--help" ];then
printf "usage: dmenu_path [--clear]\n" >&2
exit 0
fi
if [ "$1" = "--clear" ];then
rm -f "$cache"
fi
[ ! -e "$cachedir" ] && mkdir -p "$cachedir"
IFS=:
if stest -dqr -n "$cache" $PATH; then
stest -flx $PATH | sort -u | tee "$cache"
else
cat "$cache"
fi