summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/tmux.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Add getpw to pledge, makes tmux work in YP environments, discovered bynicm2015-11-221-3/+3
| | | | matthieu, ok deraadt
* Instead of separate tables for different types of options, give eachnicm2015-11-201-4/+4
| | | | option a scope type (server, session, window) in one table.
* Accidentally turned off pledge, turn it back on.nicm2015-11-151-2/+2
|
* Push stdout and stderr to clients more aggressively, and add an event tonicm2015-11-141-2/+2
| | | | continue if the send fails.
* tmux is UTF-8, so if $TMUX is set (tmux running in tmux), the client isnicm2015-11-121-17/+23
| | | | UTF-8. Also try to make the existing checks more readable.
* Nuke the utf8 and status-utf8 options and make tmux only a UTF-8nicm2015-11-121-7/+1
| | | | | terminal. We still support non-UTF-8 terminals outside tmux, but inside it is always UTF-8 (as when the utf8 and status-utf8 options were on).
* Drop mouse-utf8 option and always turn on UTF-8 mouse if the client saysnicm2015-11-111-2/+1
| | | | it supports UTF-8.
* Like options, move the environ struct into environ.c.nicm2015-10-281-5/+5
|
* Move struct options into options.c.nicm2015-10-271-17/+16
|
* Break the common process set up, event loop and imsg dispatch codenicm2015-10-271-4/+2
| | | | | between server and client out into a separate internal API. This will make it easier to add another process.
* Let's see if anyone screams about not being able to specify $TMPDIRderaadt2015-10-251-3/+1
| | | | | | | | | for their tmux sockets. (Over the years, I have seen $TMPDIR set up worse than /tmp many times, and don't know how this practice infected other parts of the system. Nothing uses tmpdir(3), nor a huge-temporary-file program like sort.) ok nicm
* tmux can call pledge() in main with large set and then reduce itnicm2015-10-231-1/+6
| | | | | slightly in the server to "stdio rpath wpath cpath fattr unix recvfd proc exec tty ps".
* Move tzset() from log_open to main.nicm2015-09-141-1/+2
|
* A couple of style nits.nicm2015-09-031-3/+2
|
* Work out config file when needed not at startup.nicm2015-09-011-21/+9
|
* Path from $TMUX does not need to be global anymore.nicm2015-08-301-14/+14
|
* Login shell can be a client flag, and move the exec code into client.c.nicm2015-08-301-31/+7
|
* Event base does not need to be global.nicm2015-08-301-5/+2
|
* Some style nits and dead assignments.nicm2015-08-301-3/+3
|
* Add an option (history-file) for a file to save/restore command promptnicm2015-07-201-10/+20
| | | | history, from Olof-Joachim Frahm.
* tweak SYNOPSIS and usage();jmc2015-06-041-2/+2
|
* Make a tmux-%u directory under TMUX_TMPDIR, like TMPDIR.nicm2015-01-191-2/+2
|
* Only care about other permissions, allow group to be set.nicm2015-01-191-2/+2
|
* Remove unnecessary duplicate S_ISDIR check, from Dmitri Paduchikh.nicm2015-01-191-3/+2
|
* Tidy up some includes.nicm2014-10-201-4/+5
|
* Remove the "info" message mechanism, this was only used for about fivenicm2014-04-171-6/+5
| | | | | | mostly useless and annoying messages. Change those commands to silence on success like all the others. Still accept the -q command line flag and "quiet" server option for now.
* Remove log_debug2 as well and simplify log.c.nicm2014-03-311-2/+2
|
* Leftovers from removing 88 colour support, from Theo Buehler.nicm2014-02-161-2/+2
|
* Do not attempt to read .tmux.conf if we can't figure out a homenicm2014-01-151-6/+11
| | | | directory, from Tiago Cunha.
* Three small changes from Tiago Cunha:nicm2014-01-091-2/+6
| | | | | | - Check for truncation when copying path. - Don't need to use a temporary buffer in screen_set_title. - Include strerror in output when connecting to server fails.
* We accidentally haven't been using $TMUX to work out the session for anicm2013-10-101-23/+9
| | | | | | 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.
* Alter how tmux handles the working directory to internally use filenicm2013-10-101-26/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | descriptors rather than strings. - Each session still has a current working directory. - New sessions still get their working directory from the client that created them or its attached session if any. - New windows are created by default in the session working directory. - The -c flag to new, neww, splitw allows the working directory to be overridden. - The -c flag to attach let's the session working directory be changed. - The default-path option has been removed. To get the equivalent to default-path '.', do: bind c neww -c $PWD To get the equivalent of default-path '~', do: bind c neww -c ~ This also changes the client identify protocol to be a set of messages rather than one as well as some other changes that should make it easier to make backwards-compatible protocol changes in future.
* Merge IDENTIFY_* flags with CLIENT_* flags.nicm2013-10-101-9/+9
|
* Don't treat TMUX_TMPDIR as a potential filenicm2013-10-101-3/+5
| | | | | | | | | | | | | The point of setting TMUX_TMPDIR is to then make any labels from -L go to that directory. In the case of makesocketpath() with no TMUX_TMPDIR set, would set both the path and the default socket to a file. The checking of the permissions on the file worked fine in that case, but when TMUX_TMPDIR is set, won't work on a directory. This fixes the problem by ensuring the check on the permissions is performed on directories only. By Thomas Adam.
* Fix previous not to leak fd on failure, whoops.nicm2013-10-051-8/+10
|
* Use open(".")/fchdir() to save and restore current directory rather thannicm2013-10-051-4/+10
| | | | getcwd()/chdir().
* Rename global configuration define.nicm2013-04-241-2/+2
|
* Call setlocale(LC_TIME) at startup.nicm2013-04-111-1/+4
|
* Add TMUX_TMPDIR variable to put the socket directory outsidenicm2013-03-271-4/+6
| | | | TMPDIR. From Ben Boeckel.
* Remove tmux's (already minimal) 88 colour support. Such terminals arenicm2013-03-271-7/+2
| | | | few and unnecessary.
* Rename session idx to session id throughout and add $ prefix to targetsnicm2013-03-251-5/+5
| | | | to use it, extended from a diff from George Nachman.
* Add a command queue to standardize and simplify commands that call othernicm2013-03-241-3/+1
| | | | | | | | | | | | | | | | | | | | | | 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.
* Correctly aggregate together errors from nested config files (withnicm2012-11-271-1/+3
| | | | source-file). Fix by Thomas Adam, reported by Sam Livingstone-Gray
* Call realpath earlier on the socket directory path rather than on thenicm2012-11-261-5/+7
| | | | | socket file path because the latter may not exist yet and in that case realpath is allowed to fail. From Romain Francoise.
* xfree is not particularly helpful, remove it. From Thomas Adam.nicm2012-07-101-14/+9
|
* Add a skeleton mode to tmux (called "control mode") that let's tmuxnicm2012-06-181-2/+8
| | | | | | | commands be sent and output received on stdout. This can be used to integrate with other terminal emulators and should allow some other things to be made simpler later. More to come so doesn't do much yet and deliberately not documented.
* Do not use stderr for log file and don't call log_close when not needed.nicm2012-05-301-2/+1
|
* Simplify logging and just fprintf(stderr, ...) for early errors.nicm2012-05-251-5/+3
|
* Drop the ability to have a list of keys in the prefix in favour of twonicm2012-01-211-8/+1
| | | | | | | | | | separate options, prefix and prefix2. This simplifies the code and gets rid the data options type which was only used for this one option. Also add a -2 flag to send-prefix to send the secondary prefix key, fixing a cause of minor irritation. People who want three prefix keys are out of luck :-).
* Try to resolve relative paths for loadb and saveb (first using clientnicm2011-10-231-1/+17
| | | | working directory if any then default-path or session wd).