mirror of
https://github.com/tmux/tmux.git
synced 2024-12-13 01:48:47 +00:00
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
Conflicts: cmd-if-shell.c cmd-run-shell.c tmux.1
This commit is contained in:
commit
69a8d64716
2
README
2
README
@ -41,7 +41,7 @@ directory.
|
||||
For debugging, running tmux with -v or -vv will generate server and client log
|
||||
files in the current directory.
|
||||
|
||||
tmux mailing lists are available. The visit:
|
||||
tmux mailing lists are available. Visit:
|
||||
|
||||
https://sourceforge.net/mail/?group_id=200378
|
||||
|
||||
|
59
TODO
59
TODO
@ -30,40 +30,30 @@ TMUX UI ISSUES
|
||||
to avoid quoting
|
||||
- make command sequences more usable: don't require space after ;, handle
|
||||
errors better
|
||||
- attach should have a flag to create session if it doesn't exist
|
||||
- choice and more mode would be better per client than per window?
|
||||
- hooks to which commands may be attached, for example: tmux add-hook
|
||||
"new-session" if-shell "[ -e $HOME/.tmux-session.conf ]" source-file
|
||||
$HOME/.tmux-session.conf
|
||||
- way to set socket path from config file
|
||||
- what about utmp etc? can tmux update it like screen? setgid?
|
||||
- warts on current naming:
|
||||
- display-time but message-fg/bg/attr
|
||||
- list-* vs show-*
|
||||
- server-info
|
||||
- up-pane/down-pane/swap-pane -U/swap-pane -D vs next-*/previous-*
|
||||
- split-window -> split-pane??
|
||||
- a way for force-width/height to apply to only one pane (how?)
|
||||
- command to list what is actually running in each window with command line,
|
||||
pid (need some adaption of the osdep code)
|
||||
- some way to force a screen to use the entire terminal even if it is forced
|
||||
to be smaller by other clients. pan smaller terminal? (like screen F)
|
||||
-- idea of a "view" onto a window, need base x/y offsets for redraw
|
||||
- handle resize better in copy mode
|
||||
- way to copy stuff that is off screen due to resize
|
||||
- commands should be able to succeed or fail and have || or && for command
|
||||
lists
|
||||
- some way to KEEP a command running continually and just use its LAST line of
|
||||
- some way to keep a command running continually and just use its last line of
|
||||
output
|
||||
- UTF-8 to a non-UTF-8 terminal should not be able to balls up
|
||||
the terminal - www/ruby-addressable; make regress
|
||||
- support esc-esc to quit in modes
|
||||
- fix ctrl+F1-F4 output. to what?
|
||||
- better utf8 support: window names, prompt input, message display
|
||||
- session history for client and last-session command
|
||||
- option to change status line colour when current window is in a mode?
|
||||
- option to move copy mode indicator into status line
|
||||
- list-buffer/show-buffer should display UTF-8
|
||||
- selection behaviour closer to vi in vi mode
|
||||
- live update: server started with -U connects to server, requests sessions and
|
||||
windows, receives fds
|
||||
@ -76,14 +66,11 @@ TMUX UI ISSUES
|
||||
- better session sharing: create-socket command to create socket somewhere (-r
|
||||
flag for readonly)
|
||||
- multiline status line (no?)
|
||||
- flag for absolute pane size to resize-pane
|
||||
- sanity check input to socket
|
||||
- support title stack, both internally and externally
|
||||
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=1149299+0+archive/2010/freebsd-questions/20100207.freebsd-questions
|
||||
- command to show status line information briefly when it is off
|
||||
- some way to pad # stuff with spaces, #!2T maybe
|
||||
- a binding to "scroll down and exit at bottom" copy mode
|
||||
- some way to pass keystrokes in copy mode through to underlying window
|
||||
- some way to pass keystrokes in copy mode through to underlying window. why?
|
||||
- last window update time and # replacement for it for display-message
|
||||
- find-window across sessions - other ways to make session handling easier?
|
||||
- ' and " should be parsed the same (eg "\e" vs '\e') in config and command
|
||||
@ -92,44 +79,29 @@ TMUX UI ISSUES
|
||||
- audit of escape sequence support vs xterm
|
||||
- support binding keys to mouse (mouse-select-pane -> mouse-keys or something,
|
||||
mouse click == select-pane -t %%, mouse scroll up == copy-mode)
|
||||
- something for -t "last window in session" so a session can be used as a stack
|
||||
- synchronous commands - client sends cmd and blocks, neww/splitw saves client
|
||||
ptr then when program inside died, sends MSG_SOMETHING with wait status to
|
||||
client
|
||||
- bind commands to key sequences? -- make it so ALL keys go through a table,
|
||||
first an implicit table in which C-b is the only default binding to a
|
||||
command that says "next key from $othertable" and so on. means -n can
|
||||
go away as well
|
||||
- monitor, bell etc should monitor /all/ panes in the window not just one
|
||||
- a history of commands that can be reversed (reverse member of each command,
|
||||
and a buffer) info() when changing to same window
|
||||
and a buffer)
|
||||
- info() when changing to same window
|
||||
- way to add dest for break-pane; maybe some easier way to unbreak-pane
|
||||
- case insensitive searching
|
||||
- incremental searching in copy mode.
|
||||
- configurable borders and empty space filler for when panes < window?
|
||||
- mouse-select-pane will screw up with !MODE_MOUSE_STANDARD (it sets the
|
||||
flag on w/o checking the others before calling tty_update_mode)
|
||||
- multiple keys could be done with tables, ie have prefixes go and instead
|
||||
bind -n ^A prefix-table "default"
|
||||
where prefix-table sets command lookup table and sets prefix flag, then next
|
||||
key is looked up in that table
|
||||
- pass shell commands as argv rather than strings, allow them to be specified
|
||||
in commands without quotes
|
||||
- numeric prefix in copy mode should be paste buffer for C-w
|
||||
- named buffers and allow gaps in the stack
|
||||
- get rid of separate UTF-8 cell stuff: add 1 byte to cell and store BMP as
|
||||
uint16_t+3 bits of flags. anything <=0xffff is Unicode, higher are used to
|
||||
build tree of combined characters/non-BMP (LRU dropped when full)
|
||||
- entry in FAQ about what to do when someone does mkdir /tmp/tmux-1000
|
||||
- monitor-activity is broken in several ways with multiple clients
|
||||
- monitor-activity should be more powerful (eg set a region)
|
||||
- maybe a way to put pane names instead of window names in status line
|
||||
- support for borderless panes
|
||||
- run-shell/if-shell should support status_replace stuff
|
||||
- wait-pane command or another way to make it synchronous/wait for command to
|
||||
finish
|
||||
- wait-for command 20130222153957.GY6782@yelena.nicm.ath.cx
|
||||
- last-pane across sessions
|
||||
- attach should take a pane and select it as well as attaching
|
||||
- panes should have names like windows
|
||||
- command-prompt doesn't work if made read-only. why?
|
||||
- option to quote format eg #{session_name:quoted}
|
||||
@ -144,16 +116,14 @@ TMUX UI ISSUES
|
||||
- way to tag a layout as a number/name
|
||||
- optimize pane redraws, 20120318184853.GK10965@yelena.nicm.ath.cx
|
||||
- support multibyte key strings
|
||||
- allow commands to be executed when certaing patterns in a screen
|
||||
- allow commands to be executed when certain patterns in a screen
|
||||
are clicked on with the mouse
|
||||
- flag to make next/previous commands skip a window
|
||||
- way to do tmux command/run-shell from mode keys
|
||||
- send command to all windows
|
||||
- choose-pane command
|
||||
- Augment choose-tree to do this? TA to investigate.
|
||||
- choose-mode and copy-mode are very similar. Perhaps make choose-mode a
|
||||
subset of copy-mode in that it inherits key-bindings and other traits but
|
||||
not all.
|
||||
- choose-pane command (augment choose-tree to do this?)
|
||||
- choose-mode and copy-mode are very similar. Perhaps make choose-mode a subset
|
||||
of copy-mode in that it inherits key-bindings and other traits but not all
|
||||
- add -c for new-session like new-window
|
||||
- flag to choose-* for sort order (eg sort windows/sessions/clients by last
|
||||
used time) - perhaps using formats (but what about numeric sort)?
|
||||
@ -163,6 +133,14 @@ TMUX UI ISSUES
|
||||
and for session we look session->global
|
||||
- maybe keep last layout + size around and if size reverts just put it back
|
||||
- way to set hints/limits about pane size for resizing
|
||||
- revamp layouts: they are too complicated, should be more closely integrated,
|
||||
should support hints, layout sets should just be a special case of custom
|
||||
layouts, and we should support panes that are not attached to a cell at
|
||||
all. this could be the time to introduce panelink to replace layout_cell
|
||||
- run-shell/if-shell should support formats
|
||||
- attach should take a pane and select it as well as attaching
|
||||
- attach should have a flag to create session if it doesn't exist. or better
|
||||
new a flag to attach it
|
||||
|
||||
TERMINAL ISSUES
|
||||
================
|
||||
@ -171,8 +149,7 @@ TERMINAL ISSUES
|
||||
- clear window title on exit (see using xterm title stack)
|
||||
- get it passing all the vttest tests that don't require resizing the terminal
|
||||
- support for bce
|
||||
- use screen-256color when started on 256 colour terminal??
|
||||
- if-shell/run-shell should block further command execution in the same command
|
||||
- use screen-256color when started on 256 colour terminal?
|
||||
* We need a tmux terminfo entry to document the extensions we are using in
|
||||
upstream terminfo. Must NOT change (only add or remove) anything from
|
||||
TERM=screen so we can fallback!
|
||||
|
@ -37,8 +37,8 @@ void cmd_if_shell_free(void *);
|
||||
|
||||
const struct cmd_entry cmd_if_shell_entry = {
|
||||
"if-shell", "if",
|
||||
"b", 2, 3,
|
||||
"[-b] shell-command command [command]",
|
||||
"bt:", 2, 3,
|
||||
"[-b] " CMD_TARGET_PANE_USAGE " shell-command command [command]",
|
||||
0,
|
||||
NULL,
|
||||
NULL,
|
||||
@ -58,7 +58,22 @@ cmd_if_shell_exec(struct cmd *self, struct cmd_q *cmdq)
|
||||
{
|
||||
struct args *args = self->args;
|
||||
struct cmd_if_shell_data *cdata;
|
||||
const char *shellcmd = args->argv[0];
|
||||
char *shellcmd;
|
||||
struct session *s;
|
||||
struct winlink *wl;
|
||||
struct window_pane *wp;
|
||||
struct format_tree *ft;
|
||||
|
||||
wl = cmd_find_pane(cmdq, args_get(args, 't'), &s, &wp);
|
||||
if (wl == NULL)
|
||||
return (CMD_RETURN_ERROR);
|
||||
|
||||
ft = format_create();
|
||||
format_session(ft, s);
|
||||
format_winlink(ft, s, wl);
|
||||
format_window_pane(ft, wp);
|
||||
shellcmd = format_expand(ft, args->argv[0]);
|
||||
format_free(ft);
|
||||
|
||||
cdata = xmalloc(sizeof *cdata);
|
||||
cdata->cmd_if = xstrdup(args->argv[1]);
|
||||
@ -73,6 +88,7 @@ cmd_if_shell_exec(struct cmd *self, struct cmd_q *cmdq)
|
||||
cmdq->references++;
|
||||
|
||||
job_run(shellcmd, cmd_if_shell_callback, cmd_if_shell_free, cdata);
|
||||
free(shellcmd);
|
||||
|
||||
if (cdata->bflag)
|
||||
return (CMD_RETURN_NORMAL);
|
||||
|
@ -75,14 +75,25 @@ cmd_run_shell_exec(struct cmd *self, struct cmd_q *cmdq)
|
||||
{
|
||||
struct args *args = self->args;
|
||||
struct cmd_run_shell_data *cdata;
|
||||
const char *shellcmd = args->argv[0];
|
||||
char *shellcmd;
|
||||
struct session *s;
|
||||
struct winlink *wl;
|
||||
struct window_pane *wp;
|
||||
struct format_tree *ft;
|
||||
|
||||
if (cmd_find_pane(cmdq, args_get(args, 't'), NULL, &wp) == NULL)
|
||||
wl = cmd_find_pane(cmdq, args_get(args, 't'), &s, &wp);
|
||||
if (wl == NULL)
|
||||
return (CMD_RETURN_ERROR);
|
||||
|
||||
ft = format_create();
|
||||
format_session(ft, s);
|
||||
format_winlink(ft, s, wl);
|
||||
format_window_pane(ft, wp);
|
||||
shellcmd = format_expand(ft, args->argv[0]);
|
||||
format_free(ft);
|
||||
|
||||
cdata = xmalloc(sizeof *cdata);
|
||||
cdata->cmd = xstrdup(args->argv[0]);
|
||||
cdata->cmd = shellcmd;
|
||||
cdata->bflag = args_has(args, 'b');
|
||||
cdata->wp_id = wp->id;
|
||||
|
||||
|
9
tmux.1
9
tmux.1
@ -3470,6 +3470,7 @@ Miscellaneous commands are as follows:
|
||||
Display a large clock.
|
||||
.It Xo Ic if-shell
|
||||
.Op Fl b
|
||||
.Op Fl t Ar target-pane
|
||||
.Ar shell-command command
|
||||
.Op Ar command
|
||||
.Xc
|
||||
@ -3485,6 +3486,10 @@ With
|
||||
.Fl b ,
|
||||
.Ar shell-command
|
||||
is run in the background.
|
||||
Before being executed, shell-command is expanded using the rules specified in the
|
||||
.Sx FORMATS
|
||||
section, including those relevant to
|
||||
.Ar target-pane .
|
||||
.It Ic lock-server
|
||||
.D1 (alias: Ic lock )
|
||||
Lock each client individually by running the command specified by the
|
||||
@ -3502,6 +3507,10 @@ without creating a window.
|
||||
With
|
||||
.Fl b ,
|
||||
the command is run in the background.
|
||||
Before being executed, shell-command is expanded using the rules specified in
|
||||
the
|
||||
.Sx FORMATS
|
||||
section.
|
||||
After it finishes, any output to stdout is displayed in copy mode (in the pane
|
||||
specified by
|
||||
.Fl t
|
||||
|
@ -16,7 +16,7 @@
|
||||
<li><a href="http://www.openbsd.org/cgi-bin/man.cgi?query=tmux&sektion=1">Manual Page</a></li>
|
||||
<li><a href="https://sourceforge.net/p/tmux/tmux-code/ci/master/tree/FAQ">FAQ</a></li>
|
||||
<li><a href="https://sourceforge.net/p/tmux/tmux-code/ci/master/tree/">Source Code</a></li>
|
||||
<li><a href="http://sf.net/projects/tmux">Project Page</a></li>
|
||||
<li><a href="http://sf.net/projects/tmux">SourceForge Page</a></li>
|
||||
<li><a href="https://lists.sourceforge.net/lists/listinfo/tmux-users">Mailing List</a></li>
|
||||
<li><a href="irc://irc.freenode.net/tmux">IRC Channel</a></li>
|
||||
</ul>
|
||||
|
Loading…
Reference in New Issue
Block a user