diff --git a/Changelog b/Changelog index ca5f918..3a23ed0 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,7 @@ [Changes 1.2.2] +* Add /EXEC -WINTARGET argument. (caf) + * Update command-line help text to explain server descriptions. Reported by Ant. (caf) diff --git a/source/exec.c b/source/exec.c index 15bb417..636787e 100644 --- a/source/exec.c +++ b/source/exec.c @@ -235,6 +235,24 @@ BUILT_IN_COMMAND(execcmd) refnum = current_refnum(); } + /* + * /EXEC -WINTARGET sends all output for an /exec to + * a given target window + */ + else if (my_strnicmp(flag, "WINTARGET", len) == 0) + { + const char *desc = next_arg(args, &args); + Window *w; + + if (!desc || !(w = get_window_by_desc(desc))) + { + say("Target window not found"); + return; + } + refnum_flag = 1; + refnum = w->refnum; + } + /* * /EXEC -MSG redirects the output of an /exec * to the given target.