[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Identifier matching in the at command

From: Adrian Fita
Subject: Re: Identifier matching in the at command
Date: Sun, 5 Feb 2012 22:57:20 +0200

I want to send commands to a selection of open windows in screen. The
command to do that is the "at" command, but it doesn't allow a
sufficiently flexible syntax for selecting the windows to which to
send the commands. I can't match something like a list, let's say I
want to send the command to the windows numbered 1,3,4,6,10, or match
a range of numbers, ex: 3-9 or select the windows based on the titles
like "*string" (supposing you have some windows titled with "string"
at the end). The most flexible way to match the windows for now is
naming the windows with the same string in the front. Also, the
documentation is lacking in clearly describing what is the syntax of
the "identifier" parameter is.

Fita Adrian

On Sun, Feb 5, 2012 at 21:20, Artur Skonecki <address@hidden> wrote:
> Just out of pure curiosity. What are you trying to accomplish?
> On Sun, 5 Feb 2012, Adrian Fita wrote:
>> On Fri, Feb 3, 2012 at 13:48, Adrian Fita <address@hidden> wrote:
>>> [...]
>>> I'm interested in matching only a list of windows (title or numbers)
>>> or a range of numbers. Is this possible? If yes, how?
>> Seeing there doesn't seem to be an answer too soon, I poked around in
>> the source code at and I
>> think I found the code that parses the identifier in the "at" command.
>> It's located in the file process.c and begins at line no 1587. There,
>> at line 1605 I found the following:
>> if (strncmp(args[0], fore->w_title, n))
>>                      continue;
>> It seems that the title is only matched with a srtcnmp, not at all
>> with some regexp which would allow some advanced expressions for
>> matching the title. So I guess I'll have to make do with the three
>> matching methods I mentioned in the previous message. Am i right?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]