tmisu

Notification to stdout daemon
git clone https://git.inz.fi/tmisu/
Log | Files | Refs | README | LICENSE

commit 930959ca03713d2d3593279a566e8eb02b185935
parent 2fca804c5ebd83c043d890aedfa0f93e5002f3b9
Author: Christian Glindkamp <christian.glindkamp@gmail.com>
Date:   Sun,  6 Sep 2020 13:52:33 +0200

Always add a newline after "hints:" and "actions:" when not using PRINT_JSON mode

This way, the next line is not fused with the hints and actions line,
when the is no hint or action.

Before this commit with action "foo: bar" and summary "baz":
```
actions:	foo: baz
summary: baz
```

After this commit:
```
actions:
	foo: baz
summary: baz
```

Before this commit without action and summary "baz":
```
actions: summary: baz
```

After this commit:
```
actions:
summary: baz
```

Fixes #14.

Diffstat:
Mcallbacks.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/callbacks.c b/callbacks.c @@ -90,7 +90,7 @@ output: #ifdef PRINT_JSON printf("\"hints\": { "); #else - printf("hints: "); + printf("hints:\n"); #endif gchar *key; @@ -172,7 +172,7 @@ output: #ifdef PRINT_JSON printf("}, \"actions\": {"); #else - printf("actions: "); + printf("actions:\n"); #endif while (actions[index] && actions[index + 1]) {