summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/tmux.c
AgeCommit message (Collapse)Author
2015-11-24Make environ_set va_args and use it to tidy up some calls. Also add aNicholas Marriott
missing word in manpage (from jmc).
2015-11-24Shell command from -c doesn't have to be global, pass it as an argument.Nicholas Marriott
2015-11-24Tidy the code that works out the socket path, and just use the full pathNicholas Marriott
in the global socket_path rather than copying it.
2015-11-24Remove malloc_options DEBUG bit.Nicholas Marriott
2015-11-24Remove the -I part of show-messages which isn't really that useful; theNicholas Marriott
server start time can now be accessed with a new start_time format (use: tmux display -p '#{t:start_time}')
2015-11-24Make the log stuff a bit tidier with some helper functions.Nicholas Marriott
2015-11-22Add getpw to pledge, makes tmux work in YP environments, discovered byNicholas Marriott
matthieu, ok deraadt
2015-11-20Instead of separate tables for different types of options, give eachNicholas Marriott
option a scope type (server, session, window) in one table.
2015-11-15Accidentally turned off pledge, turn it back on.Nicholas Marriott
2015-11-14Push stdout and stderr to clients more aggressively, and add an event toNicholas Marriott
continue if the send fails.
2015-11-12tmux is UTF-8, so if $TMUX is set (tmux running in tmux), the client isNicholas Marriott
UTF-8. Also try to make the existing checks more readable.
2015-11-12Nuke the utf8 and status-utf8 options and make tmux only a UTF-8Nicholas Marriott
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).
2015-11-11Drop mouse-utf8 option and always turn on UTF-8 mouse if the client saysNicholas Marriott
it supports UTF-8.
2015-10-28Like options, move the environ struct into environ.c.Nicholas Marriott
2015-10-27Move struct options into options.c.Nicholas Marriott
2015-10-27Break the common process set up, event loop and imsg dispatch codeNicholas Marriott
between server and client out into a separate internal API. This will make it easier to add another process.
2015-10-25Let's see if anyone screams about not being able to specify $TMPDIRTheo de Raadt
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
2015-10-23tmux can call pledge() in main with large set and then reduce itNicholas Marriott
slightly in the server to "stdio rpath wpath cpath fattr unix recvfd proc exec tty ps".
2015-09-14Move tzset() from log_open to main.Nicholas Marriott
2015-09-03A couple of style nits.Nicholas Marriott
2015-09-01Work out config file when needed not at startup.Nicholas Marriott
2015-08-30Path from $TMUX does not need to be global anymore.Nicholas Marriott
2015-08-30Login shell can be a client flag, and move the exec code into client.c.Nicholas Marriott
2015-08-30Event base does not need to be global.Nicholas Marriott
2015-08-30Some style nits and dead assignments.Nicholas Marriott
2015-07-20Add an option (history-file) for a file to save/restore command promptNicholas Marriott
history, from Olof-Joachim Frahm.
2015-06-04tweak SYNOPSIS and usage();Jason McIntyre
2015-01-19Make a tmux-%u directory under TMUX_TMPDIR, like TMPDIR.Nicholas Marriott
2015-01-19Only care about other permissions, allow group to be set.Nicholas Marriott
2015-01-19Remove unnecessary duplicate S_ISDIR check, from Dmitri Paduchikh.Nicholas Marriott
2014-10-20Tidy up some includes.Nicholas Marriott
2014-04-17Remove the "info" message mechanism, this was only used for about fiveNicholas Marriott
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.
2014-03-31Remove log_debug2 as well and simplify log.c.Nicholas Marriott
2014-02-16Leftovers from removing 88 colour support, from Theo Buehler.Nicholas Marriott
2014-01-15Do not attempt to read .tmux.conf if we can't figure out a homeNicholas Marriott
directory, from Tiago Cunha.
2014-01-09Three small changes from Tiago Cunha:Nicholas Marriott
- 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.
2013-10-10We accidentally haven't been using $TMUX to work out the session for aNicholas Marriott
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.
2013-10-10Alter how tmux handles the working directory to internally use fileNicholas Marriott
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.
2013-10-10Merge IDENTIFY_* flags with CLIENT_* flags.Nicholas Marriott
2013-10-10Don't treat TMUX_TMPDIR as a potential fileNicholas Marriott
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.
2013-10-05Fix previous not to leak fd on failure, whoops.Nicholas Marriott
2013-10-05Use open(".")/fchdir() to save and restore current directory rather thanNicholas Marriott
getcwd()/chdir().
2013-04-24Rename global configuration define.Nicholas Marriott
2013-04-11Call setlocale(LC_TIME) at startup.Nicholas Marriott
2013-03-27Add TMUX_TMPDIR variable to put the socket directory outsideNicholas Marriott
TMPDIR. From Ben Boeckel.
2013-03-27Remove tmux's (already minimal) 88 colour support. Such terminals areNicholas Marriott
few and unnecessary.
2013-03-25Rename session idx to session id throughout and add $ prefix to targetsNicholas Marriott
to use it, extended from a diff from George Nachman.
2013-03-24Add a command queue to standardize and simplify commands that call otherNicholas Marriott
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.
2012-11-27Correctly aggregate together errors from nested config files (withNicholas Marriott
source-file). Fix by Thomas Adam, reported by Sam Livingstone-Gray
2012-11-26Call realpath earlier on the socket directory path rather than on theNicholas Marriott
socket file path because the latter may not exist yet and in that case realpath is allowed to fail. From Romain Francoise.