ups the version number to 0.1.11
[gkrellmbgchg.git] / bgchg_info.sh
blobe2bdfa9e99a771a45dc68e36a8d9c88b0c29a192
1 ##
2 ## Usage: bgchg_info <tag> <value>
3 ## Simply prints <tag>:<value> in a line.
4 ## bgchg_info <tooltip>
5 ## Equivalent to bgchg_info tooltip <tooltip>
6 ## bgchg_info <tag> <format> <arg1> ...
7 ## Equivalent to bgchg_info <tag> "$(printf <format> <arg1> ...)"
8 ##
9 ## The function does not check if the given arguments are valid. In
10 ## particular it doesn't check if <tag> doesn't contain a colon or
11 ## <value> a new line.
13 bgchg_info () {
14 if [ $# -eq 1 ]; then
15 printf 'tooltip:%s\n' "$1"
16 elif [ $# -eq 2 ]; then
17 printf '%s:%s\n' "$1" "$2"
18 elif [ $# -gt 2 ]; then
19 printf %s: "$1"
20 shift
21 printf "$@"
22 echo