summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--src/hook.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c2e9c65..cacc4a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/src/hook.c b/src/hook.c
index 1b2b643..3ff4751 100644
--- a/src/hook.c
+++ b/src/hook.c
@@ -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);
+ }
}
}