dot

packages and services management
Log | Files | Refs | README

commit 1290e461021f379c68a0719e75472136e493ad4f
parent 4b9a51bc353b51c7bdede3a3e2aa83442ae04118
Author: Josuah Demangeon <mail@josuah.net>
Date:   Thu, 15 Feb 2018 01:24:02 +0100

[del] removing obselete sections

Diffstat:
Mbin/io | 36+++++++++++-------------------------
1 file changed, 11 insertions(+), 25 deletions(-)

diff --git a/bin/io b/bin/io @@ -8,14 +8,7 @@ cmd="${1:-open}" case "$cmd" in (a|abduco) - if [ "$#" -gt 0 ] - then - id="$1" - shift - else - id=$({ printf '#'; abduco; } | iomenu -# | cut -f4) - fi - + id=$({ printf '#'; abduco; } | iomenu -# | cut -f4) [ "$SSH_TTY" ] && e='^Z' || e='^\' [ "$id" ] && ABDUCO="$id" exec abduco -e "$e" -A "$id" "$@" ;; @@ -77,22 +70,20 @@ EOF sort > "$cache/$dir" esac - exec xdg-open "$(find "$HOME" -maxdepth 1 -mindepth 1 | - sort | - cut -c $(($#HOME + 2))- | - xargs -I {} printf '%s/%s\n' "$cache" {} | - xargs -I {} cat "$cache" {} 2> /dev/null | - cat - "$ETC/uri" | - iomenu -# | + exec xdg-open "$(find "$HOME" -maxdepth 1 -mindepth 1 | + sort | + cut -c $((${#HOME} + 2))- | + xargs -I {} printf '%s/%s\n' "$cache" {} | + xargs -I {} cat "$cache" {} 2> /dev/null | + cat - "$ETC/uri" | + iomenu -# | cut -f 2-)" ;; (ps) - { - printf '#' - ps -ax || ps - } | iomenu -# | sed -r 's/[^ ]* *([0-9]*).*/\1/' + { printf '#'; ps -ax || ps; } | iomenu -# | + sed -r 's/[^ ]* *([0-9]*).*/\1/' ;; -(pwd) +(p|passwd) { printf '#/etc/passwd\n' column -ts : < /etc/passwd @@ -100,11 +91,6 @@ EOF column -ts : < /etc/group } | iomenu -# ;; -(s|sfeed) - exec xdg-open "$(find "$HOME/.sfeed/feeds" -type f \ - -exec sfeed_plain {} + | - sort -k 2 -t ' ' | iomenu | sed 's/.* //')" - ;; (*) printf 'usage: %s ' "${0##*/}" sed -n '/^(/ { s/^(//; s/)$//; s/|.\(.*\)/[\1]/; /^\*$/d; p; }' "$0" |