diff options
Diffstat (limited to 'bin/menu_path')
-rwxr-xr-x | bin/menu_path | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/menu_path b/bin/menu_path new file mode 100755 index 0000000..151a637 --- /dev/null +++ b/bin/menu_path @@ -0,0 +1,13 @@ +#!/bin/sh + +cachedir="${XDG_CACHE_HOME:-"$HOME/.cache"}" +cache="$cachedir/menu_run" + +[ ! -e "$cachedir" ] && mkdir -p "$cachedir" + +IFS=: +if filter -dqr -n "$cache" $PATH; then + filter -flx $PATH | sort -u | tee "$cache" +else + cat "$cache" +fi |