diff options
author | Sadrul Habib Chowdhury <sadrul@users.sourceforge.net> | 2009-09-30 15:54:19 -0400 |
---|---|---|
committer | Sadrul Habib Chowdhury <sadrul@users.sourceforge.net> | 2009-09-30 15:54:19 -0400 |
commit | 8147d08647d59aba7accb748c42db2aba3f31bc4 (patch) | |
tree | 2decb5cf015d3b1899116d79cd2c11628fd2ce60 /src/process.c | |
parent | 7cb17d54cc8fca88e17d6d1e7be2fd49daef1b9d (diff) | |
download | screen-8147d08647d59aba7accb748c42db2aba3f31bc4.tar.gz |
'screen -Q <command>' to get back results.
This is the just the start of querying an existing session. The goal
is to allow something like "windows=`screen -Q windows`" in a bash
script to get back the results from the 'windows' command.
Most of the framework is done. Now the commands need to be updated
to specially deal with the queries.
Diffstat (limited to 'src/process.c')
-rw-r--r-- | src/process.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/process.c b/src/process.c index fa3d06c..1737dcf 100644 --- a/src/process.c +++ b/src/process.c @@ -1144,6 +1144,18 @@ int key; return; } n = comms[nr].flags; + /* XXX: Commands will have a CAN_QUERY flag, depending on whether they have + something to return on a query. For example, 'windows' can return a result, + but 'other' cannot. + */ +#if 0 + if (!(n & CAN_QUERY) && queryflag) + { + /* Query flag is set, but this command cannot be queried. */ + Msg(0, "%s command cannot be queried.", comms[nr].name); + return; + } +#endif if ((n & NEED_DISPLAY) && display == 0) { Msg(0, "%s: %s: display required", rc_name, comms[nr].name); |