Skip to content

v0.66.0 - Owner-only save_buffer and hex keys without Enter

Latest

Choose a tag to compare

@tony tony released this 22 Nov 14:41
· 6 commits to master since this release

libtmux 0.66.0 makes two narrow breaking changes: files Server.save_buffer() creates are readable by their owner only, and Pane.send_keys() with hex_keys=True no longer adds Enter. A socket path too long for tmux now raises SocketPathTooLong, saying how far over the limit it is and where the length came from.

Highlights

  • Owner-only save_buffer files. A new file Server.save_buffer() writes is readable and writable by its owner only. It used to follow the process umask, so saved scrollback and paste buffers were usually readable by every local user. A file that already exists keeps its permissions; call path.chmod(0o644) after saving to share a new one (#903).
  • Hex keys without Enter. Pane.send_keys(..., hex_keys=True) sends only the bytes you give it, so an escape sequence or partial keystroke no longer runs the line. Pass enter=True to keep the old behaviour. Calls without hex_keys still send Enter by default, and enter=False and enter=None mean what they did (#904).
  • SocketPathTooLong. A socket path too long for a UNIX socket raises SocketPathTooLong, a LibTmuxException, in place of tmux's bare File name too long. An explicit socket_path is checked when the Server is created and a socket_name when a command runs; Server.is_alive() still returns False instead of raising (#730).

See the changelog for the full list.

What's Changed

  • Measure a tmux socket path where tmux resolves it by @tony in #730
  • Server(fix[save_buffer]): Create the saved file owner-only by @tony in #903
  • Pane(fix[send_keys]): Send hex keys without a trailing Enter by @tony in #904

Full Changelog: v0.65.0...v0.66.0