dot

packages and services management
Log | Files | Refs | README

commit 89218dd86fdfb57312df95065aee15808f8f672e
parent f7645f0ed41b99c9e8dd61b7b84f68651ee38d61
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sat, 13 May 2017 20:04:41 +0200

better posix compatibility

Diffstat:
Mbin/io | 15++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/bin/io b/bin/io @@ -9,17 +9,14 @@ mkdir -p "$CACHE/io" # --- cache -------------------------------------------------------------------- -find "$HOME" `printf $MANPATH | tr ':' ' '` -L \ - -path "/dev" -prune -o \ - -path "/sys" -prune -o \ - -path "/proc" -prune -o \ +find "$HOME" \ -path "$HOME/.*" -prune -o \ -path "*/.git/*" -prune -o \ -path "*/.hg/*" -prune -o \ -path "*/v" -prune -o \ -path "${MAIL%/*}/*/*" -prune -o \ -type d -exec printf '%s/\n' {} + -o \ - -print 2> /dev/null | sort -u > "$CACHE/find" & + -print 2> /dev/null | sort -o "$CACHE/find" & # --- history ------------------------------------------------------------------ @@ -35,7 +32,7 @@ printf '%s\n' "` selection="`{ printf '# %s\n' abduco - abduco | sed '1d; s/.*\t//; y|!|/|' + abduco | sed '1d; s/.* //; y|!|/|' printf '# %s\n' irc grep "$IRC/.*/$" "$CACHE/find" @@ -44,8 +41,8 @@ selection="`{ grep "${MAIL%/*}" "$CACHE/find" printf '# %s\n' search -# grep '\.git/$' "$CACHE/find" | sed 's|.git/||' -# grep '/src/[^/]*/$' "$CACHE/find" | grep -v '/src/.*/src/' + grep '\.git/$' "$CACHE/find" | sed 's|.git/||' + grep '/src/[^/]*/$' "$CACHE/find" | grep -v '/src/.*/src/' printf '# %s\n' music grep "$MUSIC" "$CACHE/find" @@ -56,7 +53,7 @@ selection="`{ printf '# %s\n' files grep '[^/]$' "$CACHE/find" -} | iomenu -p io -s -h | sed 's/^# //'`" +} | iomenu -p io -s -h | cut -c 3-`" command="io-${selection%% *}" path="${selection#* }"