Index: arguments.c --- arguments.c.orig 2019-07-29 11:50:43.000000000 +0200 +++ arguments.c 2019-11-27 19:20:26.835041000 +0100 @@ -72,7 +72,9 @@ args = xcalloc(1, sizeof *args); +#ifdef __Linux__ optreset = 1; +#endif optind = 1; while ((opt = getopt(argc, argv, template)) != -1) { Index: compat.h --- compat.h.orig 2019-06-26 13:26:30.000000000 +0200 +++ compat.h 2019-11-27 19:20:26.835169000 +0100 @@ -222,6 +222,22 @@ int getdtablecount(void); #endif +#ifndef MAXPATHLEN +#define MAXPATHLEN 4096 +#endif + +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif + +#ifndef MAXHOSTNAMELEN +#define MAXHOSTNAMELEN 64 +#endif + +#ifndef IOV_MAX +#define IOV_MAX 1024 +#endif + #ifndef HAVE_CLOSEFROM /* closefrom.c */ void closefrom(int); Index: osdep-freebsd.c --- osdep-freebsd.c.orig 2019-05-13 12:13:54.000000000 +0200 +++ osdep-freebsd.c 2019-11-27 19:20:26.835293000 +0100 @@ -29,7 +29,9 @@ #include #include #include +#if 0 #include +#endif #include "compat.h" @@ -137,6 +139,7 @@ static char * osdep_get_cwd_fallback(int fd) { +#if 0 static char wd[PATH_MAX]; struct kinfo_file *info = NULL; pid_t pgrp; @@ -157,6 +160,7 @@ } free(info); +#endif return (NULL); } Index: tmux.1 --- tmux.1.orig 2019-11-26 14:09:07.000000000 +0100 +++ tmux.1 2019-11-27 19:22:26.534143000 +0100 @@ -769,7 +769,7 @@ .Ql - may be followed by an offset, for example: .Bd -literal -offset indent -select-window -t:+2 +select-window \-t:+2 .Ed .Pp In addition, @@ -879,11 +879,11 @@ .Bd -literal -offset indent refresh-client -t/dev/ttyp2 -rename-session -tfirst newname +rename-session \-tfirst newname set-option -wt:0 monitor-activity on -new-window ; split-window -d +new-window ; split-window \-d bind-key R source-file ~/.tmux.conf \e; \e display-message "source-file done" @@ -892,11 +892,11 @@ Or from .Xr sh 1 : .Bd -literal -offset indent -$ tmux kill-window -t :1 +$ tmux kill-window \-t :1 -$ tmux new-window \e; split-window -d +$ tmux new-window \e; split-window \-d -$ tmux new-session -d 'vi /etc/passwd' \e; split-window -d \e; attach +$ tmux new-session \-d 'vi /etc/passwd' \e; split-window \-d \e; attach .Ed .Sh CLIENTS AND SESSIONS The @@ -1721,7 +1721,7 @@ and the result executed as a command. If .Ar template -is not given, "detach-client -t '%%'" is used. +is not given, "detach-client \-t '%%'" is used. .Pp .Fl O specifies the initial sort order: one of @@ -1785,7 +1785,7 @@ and the result executed as a command. If .Ar template -is not given, "switch-client -t '%%'" is used. +is not given, "switch-client \-t '%%'" is used. .Pp .Fl O specifies the initial sort order: one of @@ -1840,7 +1840,7 @@ substituted by the pane ID. The default .Ar template -is "select-pane -t '%%'". +is "select-pane \-t '%%'". With .Fl b , other commands are not blocked from running until the indicator is closed. @@ -2171,7 +2171,7 @@ option only opens a new pipe if no previous pipe exists, allowing a pipe to be toggled with a single key, for example: .Bd -literal -offset indent -bind-key C-p pipe-pane -o 'cat >>~/output.#I-#P' +bind-key C-p pipe-pane \-o 'cat >>~/output.#I-#P' .Ed .It Xo Ic previous-layout .Op Fl t Ar target-window @@ -2771,8 +2771,8 @@ and be set to any string. For example: .Bd -literal -offset indent -$ tmux setw -q @foo "abc123" -$ tmux showw -v @foo +$ tmux setw \-q @foo "abc123" +$ tmux showw \-v @foo abc123 .Ed .Pp @@ -2826,16 +2826,16 @@ is appended to the existing setting. For example: .Bd -literal -offset indent -set -g status-left "foo" -set -ag status-left "bar" +set \-g status-left "foo" +set \-ag status-left "bar" .Ed .Pp Will result in .Ql foobar . And: .Bd -literal -offset indent -set -g status-style "bg=red" -set -ag status-style "fg=blue" +set \-g status-style "bg=red" +set \-ag status-style "fg=blue" .Ed .Pp Will result in a red background @@ -3318,7 +3318,7 @@ Examples are: .Bd -literal -offset indent #(sysctl vm.loadavg) -#[fg=yellow,bold]#(apm -l)%%#[default] [#S] +#[fg=yellow,bold]#(apm \-l)%%#[default] [#S] .Ed .Pp The default is @@ -3741,8 +3741,8 @@ .Fl H . The following two commands are equivalent: .Bd -literal -offset indent. -set-hook -g pane-mode-changed[42] 'set -g status-left-style bg=red' -set-option -g pane-mode-changed[42] 'set -g status-left-style bg=red' +set-hook \-g pane-mode-changed[42] 'set \-g status-left-style bg=red' +set-option \-g pane-mode-changed[42] 'set \-g status-left-style bg=red' .Ed .Pp Setting a hook without specifying an array index clears the hook and sets the @@ -3758,7 +3758,7 @@ layout after every .Ic split-window : .Bd -literal -offset indent -set-hook -g after-split-window "selectl even-vertical" +set-hook \-g after-split-window "selectl even-vertical" .Ed .Pp All the notifications listed in the @@ -4881,7 +4881,7 @@ and the result executed as a command. If .Ar template -is not given, "paste-buffer -b '%%'" is used. +is not given, "paste-buffer \-b '%%'" is used. .Pp .Fl O specifies the initial sort order: one of @@ -5407,22 +5407,22 @@ .Pp Changing the default prefix key: .Bd -literal -offset indent -set-option -g prefix C-a +set-option \-g prefix C-a unbind-key C-b bind-key C-a send-prefix .Ed .Pp Turning the status line off, or changing its colour: .Bd -literal -offset indent -set-option -g status off -set-option -g status-style bg=blue +set-option \-g status off +set-option \-g status-style bg=blue .Ed .Pp Setting other options, such as the default command, or locking after 30 minutes of inactivity: .Bd -literal -offset indent -set-option -g default-command "exec /bin/ksh" -set-option -g lock-after-time 1800 +set-option \-g default-command "exec /bin/ksh" +set-option \-g lock-after-time 1800 .Ed .Pp Creating new key bindings: