From d45d26e2579b03731bb92a6754b969c31dc88614 Mon Sep 17 00:00:00 2001 From: Nikos Tsipinakis Date: Thu, 9 Apr 2020 17:19:46 +0200 Subject: [PATCH] dunstctl: Don't use function keyword Plain `foo()` is more portable, `function` doesn't appear to be supported in sh. --- dunstctl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dunstctl b/dunstctl index d8b7f16..fa824bc 100755 --- a/dunstctl +++ b/dunstctl @@ -8,9 +8,9 @@ DBUS_IFAC_DUNST="org.dunstproject.cmd0" DBUS_IFAC_PROP="org.freedesktop.DBus.Properties" DBUS_IFAC_FDN="org.freedesktop.Notifications" -function die(){ printf "%s\n" "${1}" >&2; exit 1; } +die(){ printf "%s\n" "${1}" >&2; exit 1; } -function show_help() { +show_help() { cat <<-EOH Usage: dunstctl [parameters]" Commands: @@ -25,15 +25,15 @@ function show_help() { EOH } -function method_call() { +method_call() { dbus-send --print-reply=literal --dest="${DBUS_NAME}" "${DBUS_PATH}" $* } -function property_get() { +property_get() { dbus-send --print-reply=literal --dest="${DBUS_NAME}" "${DBUS_PATH}" "${DBUS_IFAC_PROP}.Get" "string:${DBUS_IFAC_DUNST}" "string:${1}" } -function property_set() { +property_set() { dbus-send --print-reply=literal --dest="${DBUS_NAME}" "${DBUS_PATH}" "${DBUS_IFAC_PROP}.Set" "string:${DBUS_IFAC_DUNST}" "string:${1}" "${2}" }