From 185df06e7978fe1a159a726adf542fa38a8867b9 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 23 May 2020 19:46:22 -0500 Subject: Fix redirecting issues --- bollux | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bollux b/bollux index b63e645..b9d1443 100755 --- a/bollux +++ b/bollux @@ -45,7 +45,7 @@ END_USAGE ### utility functions ### # a better echo -put() { printf '%s\n' "$*" >&3; } +put() { printf '%s\n' "$*"; } # conditionally log events to stderr # lower = more important @@ -91,7 +91,7 @@ die() { # die [EXIT-CODE] MESSAGE ask() { # ask PROMPT [READ_OPT...] prompt="$1" shift - read -e -r -u 3 -p "$prompt> " "$@" + read " "$@" } # fail if something isn't installed @@ -271,8 +271,9 @@ download() { # download URL < FILE ### main entry point ### bollux() { - # use &3 for user input - exec 3<>/dev/tty + OPTIND=0 + process_cmdline "$@" + shift $((OPTIND - 1)) if (($# == 1)); then URL="$1" -- cgit 1.4.1-21-gabe81