diff options
author | sabetts <sabetts> | 2006-04-18 04:55:59 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2006-04-18 04:55:59 +0000 |
commit | 91a86a505d76d9a4a0b89ddaaefa631a660c4835 (patch) | |
tree | 4a81aa287cc53e7f4c68f3d4c3bb0578d5a4ef6d | |
parent | 40cbc1c33106eb9f432ecaf424a0f4264ee21c19 (diff) | |
download | ratpoison-91a86a505d76d9a4a0b89ddaaefa631a660c4835.zip |
(hook_run): echo the result of each command. free the
result.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/hook.c | 9 |
2 files changed, 13 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2006-04-18 Shawn Betts <sabetts@vcn.bc.ca> + + * src/hook.c (hook_run): echo the result of each command. free the + result. + 2006-04-03 Shawn Betts <sabetts@vcn.bc.ca> * src/messages.h (MESSAGE_MAP_TRANSIENT_GROUP): new define @@ -62,10 +62,17 @@ void hook_run (struct list_head *hook) { struct sbuf *cur; + cmdret *result; list_for_each_entry (cur, hook, node) { - command (1, sbuf_get (cur)); + result = command (1, sbuf_get (cur)); + if (result) + { + if (result->output) + message (result->output); + cmdret_free (result); + } } } |