aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2020-06-20 13:57:23 -0700
committerNicholas Noll <nbnoll@eml.cc>2020-06-20 13:57:23 -0700
commite12e88483cc0a2dbdc2b6ff6a3c45750cfc17d1e (patch)
tree453126005a4867fafc3693d5976e1730e8ca2531
parentdb8e974d48b8a9de58f660f159a780dce2992bb7 (diff)
fix: added aux menu files
-rwxr-xr-xbin/menu_path13
-rwxr-xr-xbin/menu_run2
2 files changed, 15 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
diff --git a/bin/menu_run b/bin/menu_run
new file mode 100755
index 0000000..5a1b9a0
--- /dev/null
+++ b/bin/menu_run
@@ -0,0 +1,2 @@
+#!/bin/sh
+menu_path | menu "$@" | ${SHELL:-"/bin/sh"} &