summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2015-10-27 12:47:45 (EDT)
committer P. J. McDermott <pj@pehjota.net>2015-10-27 12:47:45 (EDT)
commitd1bb2690d4892c63db6de266dfdde9dc434a187d (patch)
treea69fd14b53b4b77f11795cc888284017db59e0ee /src/ui
parent33b86b5b03a29264812790aaff0e492c36a9fbe5 (diff)
downloadfirman.sh-d1bb2690d4892c63db6de266dfdde9dc434a187d.zip
firman.sh-d1bb2690d4892c63db6de266dfdde9dc434a187d.tar.gz
firman.sh-d1bb2690d4892c63db6de266dfdde9dc434a187d.tar.bz2
ui/cli: Write warnings and errors to stderr
Also put dbg() before other functions.
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/cli.sh16
1 files changed, 8 insertions, 8 deletions
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 <http://www.gnu.org/licenses/>.
-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
}