Sync OpenBSD patchset 197:

Add an additional heuristic to work out the current session when run from the
command line. The name of all slave ptys in the server is known, so if the
client was run on a tty, look for any sessions containing that tty and use the
most recently created.

This is more reliable than looking at $TMUX if windows have been moved or
linked between sessions.

1 file changed
tree: 86e1ff95e4fb530ae59c2c4b4bb4475a19c54b13
  1. CHANGES
  2. FAQ
  3. GNUmakefile
  4. Makefile
  5. NOTES
  6. TODO
  7. array.h
  8. attributes.c
  9. buffer-poll.c
  10. buffer.c
  11. cfg.c
  12. client-fn.c
  13. client-msg.c
  14. client.c
  15. clock.c
  16. cmd-attach-session.c
  17. cmd-bind-key.c
  18. cmd-break-pane.c
  19. cmd-choose-session.c
  20. cmd-choose-window.c
  21. cmd-clear-history.c
  22. cmd-clock-mode.c
  23. cmd-command-prompt.c
  24. cmd-confirm-before.c
  25. cmd-copy-buffer.c
  26. cmd-copy-mode.c
  27. cmd-delete-buffer.c
  28. cmd-detach-client.c
  29. cmd-display-message.c
  30. cmd-down-pane.c
  31. cmd-find-window.c
  32. cmd-generic.c
  33. cmd-has-session.c
  34. cmd-if-shell.c
  35. cmd-kill-pane.c
  36. cmd-kill-server.c
  37. cmd-kill-session.c
  38. cmd-kill-window.c
  39. cmd-last-window.c
  40. cmd-link-window.c
  41. cmd-list-buffers.c
  42. cmd-list-clients.c
  43. cmd-list-commands.c
  44. cmd-list-keys.c
  45. cmd-list-sessions.c
  46. cmd-list-windows.c
  47. cmd-list.c
  48. cmd-load-buffer.c
  49. cmd-lock-server.c
  50. cmd-move-window.c
  51. cmd-new-session.c
  52. cmd-new-window.c
  53. cmd-next-layout.c
  54. cmd-next-window.c
  55. cmd-paste-buffer.c
  56. cmd-previous-layout.c
  57. cmd-previous-window.c
  58. cmd-refresh-client.c
  59. cmd-rename-session.c
  60. cmd-rename-window.c
  61. cmd-resize-pane.c
  62. cmd-respawn-window.c
  63. cmd-rotate-window.c
  64. cmd-save-buffer.c
  65. cmd-scroll-mode.c
  66. cmd-select-layout.c
  67. cmd-select-pane.c
  68. cmd-select-prompt.c
  69. cmd-select-window.c
  70. cmd-send-keys.c
  71. cmd-send-prefix.c
  72. cmd-server-info.c
  73. cmd-set-buffer.c
  74. cmd-set-option.c
  75. cmd-set-password.c
  76. cmd-set-window-option.c
  77. cmd-show-buffer.c
  78. cmd-show-options.c
  79. cmd-show-window-options.c
  80. cmd-source-file.c
  81. cmd-split-window.c
  82. cmd-start-server.c
  83. cmd-string.c
  84. cmd-suspend-client.c
  85. cmd-swap-pane.c
  86. cmd-swap-window.c
  87. cmd-switch-client.c
  88. cmd-unbind-key.c
  89. cmd-unlink-window.c
  90. cmd-up-pane.c
  91. cmd.c
  92. colour.c
  93. compat.h
  94. compat/
  95. configure
  96. examples/
  97. grid-view.c
  98. grid.c
  99. input-keys.c
  100. input.c
  101. key-bindings.c
  102. key-string.c
  103. layout-set.c
  104. layout.c
  105. log.c
  106. mode-key.c
  107. names.c
  108. options-cmd.c
  109. options.c
  110. osdep-darwin.c
  111. osdep-freebsd.c
  112. osdep-linux.c
  113. osdep-netbsd.c
  114. osdep-openbsd.c
  115. osdep-unknown.c
  116. paste.c
  117. resize.c
  118. screen-redraw.c
  119. screen-write.c
  120. screen.c
  121. server-fn.c
  122. server-msg.c
  123. server.c
  124. session.c
  125. status.c
  126. tmux.1
  127. tmux.c
  128. tmux.h
  129. tools/
  130. tty-keys.c
  131. tty-term.c
  132. tty.c
  133. utf8.c
  134. window-choose.c
  135. window-clock.c
  136. window-copy.c
  137. window-more.c
  138. window-scroll.c
  139. window.c
  140. www/
  141. xmalloc.c