commit 1e9a07d6cf1a5e1833f0bf59858f7cb902a142f5 parent 5cee99d917e55c961331df8b4b5b13482f391add Author: Jacob R. Edwards <jacobouno@protonmail.com> Date: Sun, 14 Feb 2021 22:03:24 -0800 Update shell `etc' module - Remove the clunky doin function - Raise an error if no feeds are given to the fed function - Use lynx(1) instead of w3m(1) to format html in the hfmt function - Remove redundent list brackets (`{}') Diffstat:
| M | modules/shell/.config/shell/etc | | | 9 | ++++----- |
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/modules/shell/.config/shell/etc b/modules/shell/.config/shell/etc @@ -1,10 +1,9 @@ # shell functions -doin() { (builtin cd ${1:?No directory} && shift && eval $@) ;} -fed() { doin "$FEED_DIR" feed $@ ;} -hfmt() { w3m -T text/html -O ASCII -dump $* ;} -loop() { while eval $*; do done } -wloop() { while { read && eval $* ;}; do done } +fed() (test $# -gt 1 && cd ${FEED_DIR:?unset} && feed $*) +hfmt() lynx -dump ${*:-'-stdin'} +loop() while eval $*; do done +wloop() while { read && eval $* ;}; do done tp() { case $* in