From d1bb2690d4892c63db6de266dfdde9dc434a187d Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 27 Oct 2015 12:47:45 -0400 Subject: ui/cli: Write warnings and errors to stderr Also put dbg() before other functions. --- (limited to 'src/ui') diff --git a/src/ui/cli.sh b/src/ui/cli.sh index 16321b8..a396625 100644 --- a/src/ui/cli.sh +++ b/src/ui/cli.sh @@ -15,34 +15,34 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -cli_info() +cli_dbg() { local fmt="${1}" shift 1 - printf "${fmt}\n" "${@}" + printf "Debug: ${fmt}\n" "${@}" } -cli_warn() +cli_info() { local fmt="${1}" shift 1 - printf "Warning: ${fmt}\n" "${@}" + printf "${fmt}\n" "${@}" } -cli_err() +cli_warn() { local fmt="${1}" shift 1 - printf "Error: ${fmt}\n" "${@}" + printf "Warning: ${fmt}\n" "${@}" >&2 } -cli_dbg() +cli_err() { local fmt="${1}" shift 1 - printf "Debug: ${fmt}\n" "${@}" + printf "Error: ${fmt}\n" "${@}" >&2 } -- cgit v0.9.1