Quickstart starts tmux with the CLI before using libtmux

Đang mở Phù hợp với người mới
#856 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
65/100
Loại issue
Tài liệu
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
documentation

Hướng nghiên cứu

Bắt đầu với mục "Open a tmux session" trong README.md (khoảng dòng 87-93) và mục "Start a tmux session" trong docs/quickstart.md (khoảng dòng 107-116), sau đó đọc các ví dụ libtmux.Server() theo sau chúng. Trong cả hai tệp, thay bước tmux new-session bằng libtmux.Server().new_session(session_name="foo", window_name="bar") và giữ lệnh tmux attach -t foo như một bước tùy chọn. Hoàn thành khi cả hai trang đều tạo phiên từ Python. Trình khởi chạy libtmux.org và bất kỳ API context manager mới nào nằm ngoài phạm vi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Summary

The README and docs/quickstart.md start with "First, start a tmux session to connect to" and a tmux new-session command, then use libtmux.Server(). libtmux can create that session itself. The maintainer asked on 2026-11-14 that ports not send users to a shell script when the library could do the job. Severity is low: the quickstart's point is piloting a session the reader attaches to in another terminal, so the shell command is part of the story.

Expected
  • The quickstart creates the session from Python: server = libtmux.Server(); session = server.new_session(session_name="foo", window_name="bar"), then tells the reader how to attach (tmux attach -t foo) as an optional step.
  • The libtmux.org "Attaching to tmux" program creates work itself and connects a second Server handle to the same socket.
Actual
  • README.md L91: tmux new-session -s foo -n bar under "Open a tmux session".
  • docs/quickstart.md L111: tmux new-session -n bar -s foo under "Start a tmux session", with the tutorial using session foo and window bar.
  • libtmux.org (libtmux/docs) shows a run.sh launcher on the Python "Attaching to tmux" guide (ports/py/guides/attaching-to-tmux.md L50-76) and an environment scrub before the landing example (home-examples.json L24). The Python landing program does not need either: it uses libtmux.Server(socket_path=..., config_file="/dev/null"), new_session, and cleans up in finally.
Proposal

None. Server.new_session, Server.kill, Server(socket_path=..., config_file=...) exist. Optional: a public, non-pytest context manager for a private server (the pytest plugin's TestServer is test-only), for example libtmux.Server.private(root=None, config_file="/dev/null") that creates a temp directory, yields a Server, kills it and removes the directory on exit.

References
  • Maintainer, 2026-11-14: "don't spam shell script to users"; file an issue per repo and name the missing APIs.
  • libtmux/docs launcher issue; related existing issues tmux-python/libtmux#804 (create or reuse tmux resources with explicit cleanup ownership) and #823.
Ngôn ngữ chính
Python
Star
1.2k
Fork
127
Merge trung bình
2 giờ 37 phút
Pull request đã merge (30 ngày)
33

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của tmux-python/libtmux

Tất cả issue của tmux-python/libtmux

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.