make "io-xdg-open" independent of my config and release it - iomenu - interactive terminal-based selection menu HTML git clone git://bitreich.org/iomenu git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/iomenu DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit 043e751461d877739b5a895d453992ea5d5f5b3c DIR parent 6231864a1651da43df604fd531e122e85312a801 HTML Author: Josuah Demangeon <mail@josuah.net> Date: Thu, 21 Jun 2018 13:01:57 +0200 make "io-xdg-open" independent of my config and release it Diffstat: A bin/io-xdg-open | 14 ++++++++++++++ 1 file changed, 14 insertions(+), 0 deletions(-) --- DIR diff --git a/bin/io-xdg-open b/bin/io-xdg-open @@ -0,0 +1,14 @@ +#!/bin/sh -e +# pick a file to open with xdg-open with iomenu with caching + +LC_COLLATE=C + +mkdir -p "$HOME/.cache" + +test "$1" = -c || ! test -f "$HOME/.cache/find" && + find "$HOME" '(' -name .git -o -name CVS ')' -prune -o \ + -type d -exec printf '%s/\n' '{}' + -o \ + -type f -exec printf '%s\n' '{}' + | + sort -o $HOME/.cache/find + +exec xdg-open "$(iomenu <$HOME/.cache/find)"