summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-capture-pane.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Instead of setting up the default keys by building the key structnicm2014-10-201-2/+1
| | | | | | | | | directly with a helper function in the cmd_entry, include a table of bind-key commands and pass them through the command parser and a temporary cmd_q. As well as being smaller, this will allow default bindings to be command sequences which will probably be needed soon.
* Add xreallocarray and remove nmemb argument from xrealloc.nicm2014-10-081-2/+2
|
* Make -S- and -E- mean the start and end to capture-pane to avoid havingnicm2014-06-201-19/+30
| | | | to faff around with huge numbers to get everything.
* Add support for named buffers. If you don't name a buffer, things worknicm2014-05-131-18/+9
| | | | | | | | much as before - buffers are automatically named "buffer0000", "buffer0001" and so on and ordered as a stack. Buffers can be named explicitly when creating ("loadb -b foo" etc) or renamed ("setb -b buffer0000 -n foo"). If buffers are named explicitly, they are not deleted when buffer-limit is reached. Diff from J Raynor.
* There is no longer a need for a paste_stack struct or for global_buffersnicm2014-04-241-3/+3
| | | | to be global. Move to paste.c.
* Remove the barely-used and unnecessary command check() function.nicm2013-10-101-2/+1
|
* Handle empty pending output (not a failure) and add \n. From Georgenicm2013-03-251-2/+4
| | | | Nachman.
* Clean up capture-pane and add -P option to dump pending output, based onnicm2013-03-251-73/+127
| | | | code from George Nachman.
* Preserve trailing spaces with capture-pane -J, from George Nachman.nicm2013-03-251-2/+2
|
* Add -q flags to shut up errors to capture-pane and show-options, fromnicm2013-03-251-47/+50
| | | | George Nachman.
* Add -a to capture-pane to capture alternate screen, from George Nachman.nicm2013-03-251-9/+21
|
* Add a command queue to standardize and simplify commands that call othernicm2013-03-241-11/+10
| | | | | | | | | | | | | | | | | | | | | | commands and allow a command to block execution of subsequent commands. This allows run-shell and if-shell to be synchronous which has been much requested. Each client has a default command queue and commands are consumed one at a time from it. A command may suspend execution from the queue by returning CMD_RETURN_WAIT and then resume it by calling cmd_continue() - for example run-shell does this from the callback that is fired after the job is freed. When the command queue becomes empty, command clients are automatically exited (unless attaching). A callback is also fired - this is used for nested commands in, for example, if-shell which can block execution of the client's cmdq until a new cmdq becomes empty. Also merge all the old error/info/print functions together and lose the old curclient/cmdclient distinction - a cmdq is bound to one client (or none if in the configuration file), this is a command client if c->session is NULL otherwise an attached client.
* Add -C and -J to capture pane to escape control sequences and to joinnicm2013-03-221-7/+14
| | | | wrapped line, based on a diff from George Nachman.
* Fix so capture-pane/save-buffer can work in control clients, from Georgenicm2013-03-221-2/+5
| | | | Nachman.
* Add -e flag to capture-pane to include embedded ANSI SGR escapenicm2013-03-221-13/+17
| | | | sequences, from George Nachman.
* Don't use a target-client for stdout, just always cmdclient.nicm2013-03-221-8/+4
|
* Support capture-pane -p to send to stdout.nicm2013-03-211-23/+36
|
* Use the CMD_*_USAGE defines consistently, from Thomas Adam.nicm2012-12-091-2/+3
|
* Make command exec functions return an enum rather than -1/0/1 values andnicm2012-07-111-8/+8
| | | | | | add a new value to mean "leave client running but don't attach" to fix problems with using some commands in a command sequence. Most of the work by Thomas Adam, problem reported by "jspenguin" on SF bug 3535531.
* xfree is not particularly helpful, remove it. From Thomas Adam.nicm2012-07-101-7/+7
|
* Extend history that can be captured to INT_MIN rather thannicm2011-12-271-3/+3
| | | | SHRT_MIN. From Chris Johnsen.
* Another memory leak from Tiago Cunha.nicm2011-08-301-1/+2
|
* Fix a couple of memory leaks, from Tiago Cunha.nicm2011-05-081-5/+7
|
* Allow a start and end line to be specified for capture-pane which may benicm2011-03-281-7/+35
| | | | | negative to capture part of the history. Prompted by request from Victor J Orlikowski.
* Clean up and simplify tmux command argument parsing.nicm2011-01-041-107/+28
| | | | | | | | | | | | | | | | | | | Originally, tmux commands were parsed in the client process into a struct with the command data which was then serialised and sent to the server to be executed. The parsing was later moved into the server (an argv was sent from the client), but the parse step and intermediate struct was kept. This change removes that struct and the separate parse step. Argument parsing and printing is now common to all commands (in arguments.c) with each command left with just an optional check function (to validate the arguments at parse time), the exec function and a function to set up any key bindings (renamed from the old init function). This is overall more simple and consistent. There should be no changes to any commands behaviour or syntax although as this touches every command please watch for any unexpected changes.
* Remove some unused defines.nicm2010-12-301-2/+2
|
* Change from a per-session stack of buffers to one global stack which isnicm2010-12-301-17/+106
| | | | | | | much more convenient and also simplifies lot of code. This renders copy-buffer useless and makes buffer-limit now a server option. By Tiago Cunha.
* Don't leak line, from Tiago Cunha.nicm2010-01-201-1/+3
|
* Massive spaces->tabs and trailing whitespace cleanup, hopefully for the lastnicm2009-12-031-2/+2
| | | | | time now I've configured emacs to make them displayed in really annoying colours...
* New command, capture-pane, which copies the entire pane contents to a pastenicm2009-12-011-0/+81
buffer. From Jonathan Alvarado.