2013-02-18 10:05:14 +01:00
|
|
|
screen: Introduce Xx string escape showing the executed command of a window
|
|
|
|
|
|
|
|
either only the executed command ('X') or the whole command line ('x') of
|
|
|
|
each window is shown.
|
|
|
|
|
|
|
|
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
|
|
|
|
2013-09-13 15:59:02 +02:00
|
|
|
--- ./doc/screen.1.orig 2013-09-13 13:26:28.055279274 +0000
|
|
|
|
+++ ./doc/screen.1 2013-09-13 13:26:41.385279250 +0000
|
|
|
|
@@ -3747,6 +3747,10 @@ window; with '+' qualifier: starting wit
|
2013-02-18 10:05:14 +01:00
|
|
|
one.
|
|
|
|
.IP W
|
|
|
|
all window numbers and names except the current one
|
|
|
|
+.IP x
|
|
|
|
+the executed command including arguments running in this windows
|
|
|
|
+.IP X
|
|
|
|
+the executed command without arguments running in this windows
|
|
|
|
.IP y
|
|
|
|
last two digits of the year number
|
|
|
|
.IP Y
|
2013-09-13 15:59:02 +02:00
|
|
|
--- ./screen.c.orig 2013-09-13 13:26:28.057279274 +0000
|
|
|
|
+++ ./screen.c 2013-09-13 13:34:30.151278421 +0000
|
|
|
|
@@ -2693,6 +2693,20 @@ int rec;
|
2013-02-18 10:05:14 +01:00
|
|
|
}
|
|
|
|
p += strlen(p) - 1;
|
|
|
|
break;
|
|
|
|
+ case 'X': case 'x':
|
2013-09-13 15:59:02 +02:00
|
|
|
+ *p = 0;
|
|
|
|
+ for (i = 0; win && win->w_cmdargs[i]; i++)
|
|
|
|
+ {
|
|
|
|
+ if (l < strlen(win->w_cmdargs[i]) + 1)
|
|
|
|
+ break;
|
|
|
|
+ sprintf(p, i ? "%s" : " %s", win->w_cmdargs[i]);
|
|
|
|
+ l -= strlen(p);
|
2013-02-18 10:05:14 +01:00
|
|
|
+ p += strlen(p);
|
2013-09-13 15:59:02 +02:00
|
|
|
+ if (i == 0 && *s == 'X')
|
|
|
|
+ break;
|
2013-02-18 10:05:14 +01:00
|
|
|
+ }
|
|
|
|
+ p--;
|
|
|
|
+ break;
|
|
|
|
case 'l':
|
|
|
|
#ifdef LOADAV
|
|
|
|
*p = 0;
|