config

OpenBSD system configuration
git clone git://jacobedwards.org/config
Log | Files | Refs | README

commit 1a9d09cbefd86f937b216f11674d8e1dead95249
parent 694a4077d7d3b7f05219e658bd5f8d09a66f4075
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date:   Fri, 15 Jan 2021 12:45:48 -0800

Add and rename shell functions

- gs() renamed to veronica so as not to conflict with ghostscript.
- Add a function to both set and unset proxy variables
- Add hfmt() function to format, and optionally fetch, html documents

Diffstat:
Mmodules/shell/.config/shell/main | 21+++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/modules/shell/.config/shell/main b/modules/shell/.config/shell/main @@ -41,17 +41,26 @@ doin() { (builtin cd ${1:?No directory} && shift && eval $@) ;} dus() { du -h "$@" | sort -h ;} fed() { doin "$FEED_DIR" feed $@ ;} fman() { groff -man -Tascii $@ | l ;} -gs() { local IFS='?' && gawk "/v2/vs/?${*:?No query}" floodgap.com ;} # my gopher client, not gnu awk +fp() { + local bin=`which $@ 2>/dev/null` + f ${bin:?No path specified} +} +hfmt() { w3m -T text/html -O ASCII -dump $* ;} lsc() { ls $* | rs ;} lsm() { ls ${SHELL_MODULE_DIR:?unset} ;} note() { doin $HOME/own/text/note/ $@ ;} -np() { unset ALL_PROXY; unset HTTP_PROXY ;} +tp() { + case $* in + y) export ALL_PROXY="socks://localhost:9050" # curl + export HTTP_PROXY=$ALL_PROXY;; # vimb + n) unset ALL_PROXY; unset HTTP_PROXY;; + *) printf '%s: arguments must be 'y' or 'n'\n' $__progname;; + esac +} reload() { . ~/.profile && include main ;} +veronica() { local IFS='?' && gawk "/v2/vs/?${*:?No query}" floodgap.com ;} vol() { sndioctl output.level=$@ ;} -fp() { - local bin=`which $@ 2>/dev/null` - f ${bin:?No such file or directory} -} +vs() { veronica $* ;} include cd include history