Discussion:
How to get info about the last pane?
João Cristóvão
2014-09-25 10:15:08 UTC
Permalink
Hi all,

Sorry for such a dumb question, but looking at the man page I cannot
seem to see how to get information from the last active pane, only
from the current, next (+) and previous (-) pane.

Since this information is kept (the last-pane command), would it make
sense to add an extra symbol meaning 'last-pane' to the target-pane
syntax (and eventually last window too)?

Thanks
João
Nicholas Marriott
2014-09-25 10:22:21 UTC
Permalink
! is last window, don't think we have the same for last pane
Post by João Cristóvão
Hi all,
Sorry for such a dumb question, but looking at the man page I cannot
seem to see how to get information from the last active pane, only
from the current, next (+) and previous (-) pane.
Since this information is kept (the last-pane command), would it make
sense to add an extra symbol meaning 'last-pane' to the target-pane
syntax (and eventually last window too)?
Thanks
Jo??o
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
Nicholas Marriott
2014-09-25 10:27:04 UTC
Permalink
Try this:

Index: cmd.c
===================================================================
RCS file: /cvs/src/usr.bin/tmux/cmd.c,v
retrieving revision 1.95
diff -u -p -r1.95 cmd.c
--- cmd.c 13 Jul 2014 20:57:46 -0000 1.95
+++ cmd.c 25 Sep 2014 10:25:13 -0000
@@ -1192,7 +1192,13 @@ cmd_find_pane(struct cmd_q *cmdq,
*wpp = wl->window->active;
else if (paneptr[0] == '+' || paneptr[0] == '-')
*wpp = cmd_find_pane_offset(paneptr, wl);
- else {
+ else if (paneptr[0] == '!' && paneptr[1] == '\0') {
+ if (wl->window->last == NULL) {
+ cmdq_error(cmdq, "no last pane");
+ goto error;
+ }
+ *wpp = wl->window->last;
+ } else {
idx = strtonum(paneptr, 0, INT_MAX, &errstr);
if (errstr != NULL)
goto lookup_string;
Post by Nicholas Marriott
! is last window, don't think we have the same for last pane
Post by João Cristóvão
Hi all,
Sorry for such a dumb question, but looking at the man page I cannot
seem to see how to get information from the last active pane, only
from the current, next (+) and previous (-) pane.
Since this information is kept (the last-pane command), would it make
sense to add an extra symbol meaning 'last-pane' to the target-pane
syntax (and eventually last window too)?
Thanks
Jo??o
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
João Cristóvão
2014-09-25 11:09:30 UTC
Permalink
Perfect! Thanks
Post by Nicholas Marriott
Index: cmd.c
===================================================================
RCS file: /cvs/src/usr.bin/tmux/cmd.c,v
retrieving revision 1.95
diff -u -p -r1.95 cmd.c
--- cmd.c 13 Jul 2014 20:57:46 -0000 1.95
+++ cmd.c 25 Sep 2014 10:25:13 -0000
@@ -1192,7 +1192,13 @@ cmd_find_pane(struct cmd_q *cmdq,
*wpp = wl->window->active;
else if (paneptr[0] == '+' || paneptr[0] == '-')
*wpp = cmd_find_pane_offset(paneptr, wl);
- else {
+ else if (paneptr[0] == '!' && paneptr[1] == '\0') {
+ if (wl->window->last == NULL) {
+ cmdq_error(cmdq, "no last pane");
+ goto error;
+ }
+ *wpp = wl->window->last;
+ } else {
idx = strtonum(paneptr, 0, INT_MAX, &errstr);
if (errstr != NULL)
goto lookup_string;
Post by Nicholas Marriott
! is last window, don't think we have the same for last pane
Post by João Cristóvão
Hi all,
Sorry for such a dumb question, but looking at the man page I cannot
seem to see how to get information from the last active pane, only
from the current, next (+) and previous (-) pane.
Since this information is kept (the last-pane command), would it make
sense to add an extra symbol meaning 'last-pane' to the target-pane
syntax (and eventually last window too)?
Thanks
Jo??o
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
Loading...