mirror of
https://github.com/tmux/tmux.git
synced 2025-12-24 09:46:06 +00:00
New session selection rules:
- find by name if given - otherwise try current index from $TMUX - otherwise if only one session, use it - otherwise error
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $Id: op-list.c,v 1.3 2007-09-26 19:38:42 nicm Exp $ */
|
||||
/* $Id: op-list.c,v 1.4 2007-09-27 09:52:03 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@@ -63,7 +63,7 @@ op_list(char *path, int argc, char **argv)
|
||||
if (*name == '\0')
|
||||
client_write_server(&cctx, MSG_SESSIONS, &sdata, sizeof sdata);
|
||||
else {
|
||||
strlcpy(wdata.name, name, sizeof wdata.name);
|
||||
client_fill_sessid(&wdata.sid, name);
|
||||
client_write_server(&cctx, MSG_WINDOWS, &wdata, sizeof wdata);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user