chiark / gitweb /
bin/wakey.zsh: Quote arguments to `notify-send' for other shells.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 21 Apr 2020 12:02:25 +0000 (13:02 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 21 Apr 2020 12:03:20 +0000 (13:03 +0100)
`zsh' itself is fine here; but I'm making this portable to `bash'.

bin/wakey.zsh

index cba071b04d3555bf6365e1d270d8b9c1c0bdbfdf..bb6e9087be5985d2cc9dea4e07239233e9d5e567 100644 (file)
@@ -53,7 +53,7 @@ __wakey_precmd () {
            *) icon=dialog-warning head="Command FAILED (rc = $rc)" ;;
          esac
          cmd=${__wakey_cmd//&/&amp;}; cmd=${cmd//</&lt;}; cmd=${cmd//>/&gt;}
-         notify-send -c Wakey -i $icon -t 5000 $head $cmd
+         notify-send -c Wakey -i $icon -t 5000 "$head" "$cmd"
       esac
       __wakey_start=nil
       ;;