summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Move the functions to convert ids from strings into session.c and window.c.nicm2015-04-251-55/+7
|
* Convert clients list into a TAILQ.nicm2015-04-241-13/+15
|
* Look up indexes as number before name, makes more sense if windows arenicm2015-04-211-5/+5
| | | | named starting with numbers. From Thomas Adam.
* Rewrite of tmux mouse support which was a mess. Instead of havingnicm2015-04-191-4/+92
| | | | | | | | | | | | | | | | | | | | | | | | | options for "mouse-this" and "mouse-that", mouse events may be bound as keys and there is one option "mouse" that turns on mouse support entirely (set -g mouse on). See the new MOUSE SUPPORT section of the man page for description of the key names and new flags (-t= to specify the pane or window under mouse as a target, and send-keys -M to pass through a mouse event). The default builtin bindings for the mouse are: bind -n MouseDown1Pane select-pane -t=; send-keys -M bind -n MouseDown1Status select-window -t= bind -n MouseDrag1Pane copy-mode -M bind -n MouseDrag1Border resize-pane -M To get the effect of turning mode-mouse off, do: unbind -n MouseDrag1Pane unbind -temacs-copy MouseDrag1Pane The old mouse options are now gone, set-option -q may be used to suppress warnings if mixing configuration files.
* Add xreallocarray and remove nmemb argument from xrealloc.nicm2014-10-081-4/+4
|
* Support using pane id as part of session or window specifier (so %1nicm2014-09-251-40/+47
| | | | | means session-of-%1 or window-of-%1) and window id as part of session (so @1 means session-of-@1).
* Support ! for last pane.nicm2014-09-251-2/+8
|
* Show an error if cmd_find_session can't find the current session, likenicm2014-07-131-4/+9
| | | | the other functions.
* If multiple arguments are given to new-session, new-window,nicm2014-05-131-2/+28
| | | | | | split-window, respawn-window or respawn-pane, pass them directly to execvp() to help avoid quoting problems. One argument still goes to "sh -c" like before. Requested by many over the years. Patch from J Raynor.
* Just use char ** for argv like normal people, not char *const *.nicm2014-05-091-2/+2
|
* Remove the choose-list command to prepare for some later choose-* work.nicm2014-04-161-2/+1
|
* Don't write into buffer if no arguments, reported by Filipe Rosset.nicm2014-03-311-1/+4
|
* Allow attach-session -t to accept a window and pane to select them onnicm2014-01-091-3/+1
| | | | attach. Based on a diff from J Raynor.
* We accidentally haven't been using $TMUX to work out the session for anicm2013-10-101-9/+1
| | | | | | while and in fact it is less useful that using the client ttyname. So don't bother and don't pass it from the client. If we need it in future it is in c->environ.
* Remove now unused cmd_get_default_path.nicm2013-10-101-72/+1
|
* Support -c for new-session, based on code from J Raynor.nicm2013-10-101-37/+24
|
* Remove the barely-used and unnecessary command check() function.nicm2013-10-101-3/+1
|
* Reserve space for \0 in cmd_print, from George Nachman.nicm2013-05-151-3/+3
|
* Sort includes and fix spaces.nicm2013-03-251-3/+3
|
* Rename session idx to session id throughout and add $ prefix to targetsnicm2013-03-251-3/+23
| | | | to use it, extended from a diff from George Nachman.
* Add a wait-for command which blocks a client on a named channel until itnicm2013-03-251-1/+2
| | | | is woken up again (with wait-for -S). From Thiago Padilha.
* tty.path can be NULL, don't dereference it. From George Nachman.nicm2013-03-251-5/+5
|
* Add a command queue to standardize and simplify commands that call othernicm2013-03-241-93/+65
| | | | | | | | | | | | | | | | | | | | | | 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.
* Fix error reporting for client commands by adding a flag tonicm2013-03-241-5/+9
| | | | | cmd_find_client to tell it whether or not to show errors, sometimes it's needed and sometimes not.
* Need to set clients in context before changing their reference count.nicm2013-03-221-2/+5
|
* Add functions to allocate and free command contexts rather than doing itnicm2013-03-221-14/+34
| | | | all on the stack.
* Do not crash when calling choose-tree with a command that changes the mode.nicm2013-03-211-2/+2
|
* Fix constness of cmd_template_replace, window_choose_add_item andnicm2013-03-211-6/+6
| | | | window_choose_add_window.
* Style nits - return (x) not return x.nicm2013-01-181-4/+4
|
* Add ^ and $ special command targets to select lowest and highestnicm2012-12-241-1/+5
| | | | numbered windows, from Raghavendra D Prabhu.
* Fix session choice so that preferring unattached sessions actuallynicm2012-11-271-13/+25
| | | | works, reported by Drew Frank.
* Use pgrp of pty fd not pid of immediate child when recovering currentnicm2012-09-241-2/+2
| | | | working directory (like current process). From Marcel Partap.
* add cmd-choose-list to allow arbitrary options to be selected. Fromnicm2012-09-031-1/+2
| | | | Thomas Adam.
* Make command exec functions return an enum rather than -1/0/1 values andnicm2012-07-111-2/+2
| | | | | | 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-28/+19
|
* Add choose-tree command to show windows and sessions in the samenicm2012-07-081-1/+2
| | | | | list. Change choose-window and -session to use the same code. From Thomas Adam.
* Do not crash when the current session has no window, fixes a bugnicm2012-06-181-3/+3
| | | | reported by Giorgio Lando. Fix from Thomas Adam.
* Do not return a buffer on the stack, mentioned by jsg a while ago.nicm2012-04-231-3/+5
|
* Fix printing commands with no arguments, from Benjamin Poirier.nicm2012-04-221-5/+4
|
* Add move-pane command (like join-pane but allows the same window). Alsonicm2012-03-031-1/+2
| | | | | -b flag to join-pane and move-pane to place the pane to the left or above. From George Nachman.
* Don't die if fail to get root directory, from Ben Boeckel.nicm2012-02-061-2/+3
|
* Provide defined ways to set the various default-path possibilities: ~nicm2012-01-311-20/+69
| | | | | | | | | for home directory, . for server start directory, - for session start directory and empty for the pane's working directory (the default). All can also be used as part of a relative path (eg -/foo). Also provide -c flags to neww and splitw to override default-path setting. Based on a diff from sthen. ok sthen
* Give each window a unique id, like panes but prefixed with @. Based onnicm2012-01-301-19/+56
| | | | work from George Nachman.
* Add some const and fix a warning.nicm2012-01-201-3/+3
|
* Allow $HOME as default-path in tmux.conf so the same config file can be usedstsp2011-12-271-1/+8
| | | | | on different machines regardless of where the user's home directory is. ok nicm
* Change the way the working directory for new processes is discovered. Ifnicm2011-12-091-1/+26
| | | | | | | | | | | | | | | | default-path isn't empty, it is used. Otherwise: 1) If tmux neww is run from the command line, the working directory of the client is used. 2) Otherwise sysctl KERN_PROC_CWD is used to retrieve the current working directory of the process in the active pane. 3) If that fails, the directory where the session was created is used. Support code by Romain Francois, OpenBSD specific bits by me. Note this requires a recent userland and kernel with KERN_PROC_CWD.
* Add a respawn-pane command, from Marcel Partap.nicm2011-06-051-1/+2
|
* Get rid of the layout string code which tries to walk through the layoutnicm2011-06-051-12/+8
| | | | hierarchy and instead just look at what panes are actually in the window.
* Fix a memory leak if cmd_pane_session succeeds, from Tiago Cunha.nicm2011-05-081-3/+3
|
* Change so that an empty session name always means the current sessionsnicm2011-04-061-3/+9
| | | | | even if given with, for example, -t '', and explicitly forbid empty session names and those containing a : when they are created.