dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit fbe16eb8e9430a9a6d425a011286c78534164bca
parent b7791ae96739ef78a4e26611e5d0110966e6941a
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Wed, 10 Jun 2020 09:46:58 +0200

Remove unused variable and clean up code

Diffstat:
M.local/bin/plumb | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/.local/bin/plumb b/.local/bin/plumb @@ -46,7 +46,6 @@ termopen() { fetch() { _o="$(mktemp)" - err="" if command -v hurl >/dev/null 2>&1; then $prefix hurl "$1" > "$_o" 2> /tmp/plumb_err elif command -v curl >/dev/null 2>&1; then @@ -55,7 +54,7 @@ fetch() { die 'could not find hurl or curl' fi if [ $? -ne 0 ]; then - msg="could not fetch $1\n\n$(cat /tmp/plumb_err)" + msg="could not fetch $1\\n\\n$(cat /tmp/plumb_err)" printf '%s\n' "$msg" >&2 notify-send "${0##*/}" "$msg" fi @@ -83,7 +82,7 @@ handle_calendar_invite() { printf 'summary: %s\n' "$summary" printf 'add to calendar? [y/N] ' - read -r $REPLY + read -r case "$REPLY" in Y|y|YES|Yes|yes|myes) month="$(printf '%s' "$starttime" | \ @@ -164,7 +163,7 @@ handle_target() { if [ "$verbose" = 1 ]; then printf 'target is not a file\n' fi - if regeximatch "$t" "\.onion"; then + if regeximatch "$t" '\.onion'; then prefix=torsocks else prefix=