Add /EXEC -WINTARGET <target> argument

This allows you to choose a specific target window for the output of an /EXEC.
This commit is contained in:
Kevin Easton 2018-11-30 13:17:27 +11:00
parent 830572b91f
commit 66b6fa4345
2 changed files with 20 additions and 0 deletions

View File

@ -1,5 +1,7 @@
[Changes 1.2.2]
* Add /EXEC -WINTARGET <target> argument. (caf)
* Update command-line help text to explain server descriptions.
Reported by Ant. (caf)

View File

@ -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 <target> redirects the output of an /exec
* to the given target.