Skip to content
Snippets Groups Projects
Commit 7460f7a9 authored by Jens Nolte's avatar Jens Nolte
Browse files

Shell output functions can now handle being called with empty arguments

parent 3255704a
No related branches found
No related tags found
No related merge requests found
......@@ -47,23 +47,6 @@ assert (typeOf swap) == "string";
print "Usage: $cmdname <CONFIG_FILE> <OUTPUT_FILE>" >&2
}
print_info() {
if [[ $# -ge 1 ]]
then
print -P "%B%F{blue}$1%b%f" >&2
else
print >&2
fi
}
print_warning() {
print -P "%B%F{yellow}$1%b%f" >&2
}
print_error() {
print -P "%B%F{red}$1%b%f" >&2
}
if [ "$1" = "--help" -o "$1" = "-h" ]
then
usage
......
print_info() {
print -P "%B%F{blue}$1%b%f" >&2
if [[ $# -ge 1 ]]
then
print -P "%B%F{blue}$1%b%f" >&2
else
print >&2
fi
}
print_warning() {
print -P "%B%F{yellow}$1%b%f" >&2
if [[ $# -ge 1 ]]
then
print -P "%B%F{yellow}$1%b%f" >&2
else
print >&2
fi
}
print_error() {
print -P "%B%F{red}$1%b%f" >&2
if [[ $# -ge 1 ]]
then
print -P "%B%F{red}$1%b%f" >&2
else
print >&2
fi
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment