dunstctl: Apply shellcheck suggestions

This commit is contained in:
Nikos Tsipinakis 2020-04-09 17:27:37 +02:00
parent 6a8401d85a
commit e14160bda6

View File

@ -26,7 +26,7 @@ show_help() {
} }
method_call() { method_call() {
dbus-send --print-reply=literal --dest="${DBUS_NAME}" "${DBUS_PATH}" $* dbus-send --print-reply=literal --dest="${DBUS_NAME}" "${DBUS_PATH}" "$@"
} }
property_get() { property_get() {
@ -58,7 +58,7 @@ case "${1:-}" in
method_call "${DBUS_IFAC_DUNST}.NotificationShow" >/dev/null method_call "${DBUS_IFAC_DUNST}.NotificationShow" >/dev/null
;; ;;
"status") "status")
property_get running | ( read _ _ status; printf "%s\n" "${status}"; ) property_get running | ( read -r _ _ status; printf "%s\n" "${status}"; )
;; ;;
"status-set") "status-set")
[ "${2:-}" ] \ [ "${2:-}" ] \
@ -76,7 +76,7 @@ case "${1:-}" in
dbus-send --print-reply=literal --dest="${DBUS_NAME}" "${DBUS_PATH}" "${DBUS_IFAC_FDN}.GetServerInformation" \ dbus-send --print-reply=literal --dest="${DBUS_NAME}" "${DBUS_PATH}" "${DBUS_IFAC_FDN}.GetServerInformation" \
| ( | (
read name vendor version protocol_version read -r name _ version _
[ "${name}" = "dunst" ] [ "${name}" = "dunst" ]
printf "dunst version: %s\n" "${version}" printf "dunst version: %s\n" "${version}"
) \ ) \