Index: arguments.c --- arguments.c.orig 2018-11-15 14:50:13.000000000 +0100 +++ arguments.c 2019-05-04 10:41:08.740056000 +0200 @@ -65,7 +65,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-04-24 23:34:48.000000000 +0200 +++ compat.h 2019-05-04 10:41:08.740185000 +0200 @@ -221,6 +221,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-04-02 17:51:09.000000000 +0200 +++ osdep-freebsd.c 2019-05-04 10:41:08.740303000 +0200 @@ -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: status.c --- status.c.orig 2019-04-24 23:34:48.000000000 +0200 +++ status.c 2019-05-04 10:43:00.591743000 +0200 @@ -320,7 +320,7 @@ struct session *s = c->session; struct screen_write_ctx ctx; struct grid_cell gc; - u_int lines, i, width = c->tty.sx; + u_int lines, i, n, width = c->tty.sx; int flags, force = 0, changed = 0; struct options_entry *o; struct format_tree *ft; @@ -364,15 +364,17 @@ /* Write the status lines. */ o = options_get(s->options, "status-format"); - if (o == NULL) - screen_write_clearscreen(&ctx, gc.bg); - else { + if (o == NULL) { + for (n = 0; n < width * lines; n++) + screen_write_putc(&ctx, &gc, ' '); + } else { for (i = 0; i < lines; i++) { screen_write_cursormove(&ctx, 0, i, 0); fmt = options_array_get(o, i); if (fmt == NULL) { - screen_write_clearline(&ctx, gc.bg); + for (n = 0; n < width; n++) + screen_write_putc(&ctx, &gc, ' '); continue; } sle = &sl->entries[i]; @@ -386,7 +388,10 @@ } changed = 1; - screen_write_clearline(&ctx, gc.bg); + for (n = 0; n < width; n++) + screen_write_putc(&ctx, &gc, ' '); + screen_write_cursormove(&ctx, 0, i, 0); + status_free_ranges(&sle->ranges); format_draw(&ctx, &gc, width, expanded, &sle->ranges); Index: tmux.1 --- tmux.1.orig 2019-04-24 23:34:48.000000000 +0200 +++ tmux.1 2019-05-04 10:41:08.740838000 +0200 @@ -535,7 +535,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, @@ -652,13 +652,13 @@ .Nm commands include: .Bd -literal -offset indent -refresh-client -t/dev/ttyp2 +refresh-client \-t/dev/ttyp2 -rename-session -tfirst newname +rename-session \-tfirst newname -set-window-option -t:0 monitor-activity on +set-window-option \-t: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" @@ -667,11 +667,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 @@ -1484,7 +1484,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 @@ -1548,7 +1548,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 @@ -1603,7 +1603,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. @@ -1923,7 +1923,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 @@ -2135,7 +2135,7 @@ sets the style for a single pane. For example, to set the pane 1 background to red: .Bd -literal -offset indent -select-pane -t:.1 -P 'bg=red' +select-pane \-t:.1 -P 'bg=red' .Ed .Pp .Fl g @@ -2492,8 +2492,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 @@ -2986,7 +2986,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 @@ -3172,7 +3172,7 @@ or with a terminal escape sequence. It may be switched off globally with: .Bd -literal -offset indent -set-window-option -g automatic-rename off +set-window-option \-g automatic-rename off .Ed .Pp .It Ic automatic-rename-format Ar format @@ -4484,7 +4484,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 @@ -4901,22 +4901,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: