[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[screen-devel] [PATCH 3/3] screen: Introduce Xx string escape showing th
From: |
Thomas Renninger |
Subject: |
[screen-devel] [PATCH 3/3] screen: Introduce Xx string escape showing the executed command of a window |
Date: |
Tue, 12 Feb 2013 00:07:55 +0100 |
either only the executed command ('X') or the whole command line ('x') of
each window is shown.
Signed-off-by: Thomas Renninger <address@hidden>
Signed-off-by: Thomas Renninger <Thomas Renninger" address@hidden>
---
src/doc/screen.1 | 4 ++++
src/screen.c | 17 +++++++++++++++++
2 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/src/doc/screen.1 b/src/doc/screen.1
index 7a0c1de..57352f1 100644
--- a/src/doc/screen.1
+++ b/src/doc/screen.1
@@ -3750,6 +3750,10 @@ window; with '+' qualifier: starting with the window
after the current
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
diff --git a/src/screen.c b/src/screen.c
index efb73d3..e8a553c 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -2681,6 +2681,23 @@ int rec;
}
p += strlen(p) - 1;
break;
+ case 'X': case 'x':
+ if (!win)
+ break;
+ if (win->w_cmdargs[0]) {
+ sprintf(p, "%s", win->w_cmdargs[0]);
+ p += strlen(p);
+ }
+ else
+ break;
+ if (*s == 'x') {
+ for (i = 1; win->w_cmdargs[i]; i++) {
+ sprintf(p, " %s", win->w_cmdargs[i]);
+ p += strlen(p);
+ }
+ }
+ p--;
+ break;
case 'l':
#ifdef LOADAV
*p = 0;
--
1.7.6.1
- [screen-devel] Extend windows command, introduce Xx string escape, Thomas Renninger, 2013/02/11
- [screen-devel] [PATCH 1/3] screen: Remove foreground and other window marking workaround, Thomas Renninger, 2013/02/11
- [screen-devel] [PATCH 3/3] screen: Introduce Xx string escape showing the executed command of a window,
Thomas Renninger <=
- [screen-devel] [PATCH 2/3] screen: Introduce windows command, Thomas Renninger, 2013/02/11
- Re: [screen-devel] Extend windows command, introduce Xx string escape, Amadeusz Sławiński, 2013/02/13
- Re: [screen-devel] Extend windows command, introduce Xx string escape, Thomas Renninger, 2013/02/14
- Re: [screen-devel] Extend windows command, introduce Xx string escape, Amadeusz Sławiński, 2013/02/14
- Re: [screen-devel] Extend windows command, introduce Xx string escape, Thomas Renninger, 2013/02/22
- Re: [screen-devel] Extend windows command, introduce Xx string escape, Amadeusz Sławiński, 2013/02/23
- Re: [screen-devel] Extend windows command, introduce Xx string escape, Axel Beckert, 2013/02/23
- Re: [screen-devel] Extend windows command, introduce Xx string escape, Amadeusz Sławiński, 2013/02/23
- Re: [screen-devel] Extend windows command, introduce Xx string escape, Juergen Weigert, 2013/02/21