Quickstart starts tmux with the CLI before using libtmux

Abierto Apto para principiantes
#856 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
65/100
Tipo de issue
Documentación
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

Comienza con la sección "Open a tmux session" de README.md (alrededor de las líneas 87-93) y la sección "Start a tmux session" de docs/quickstart.md (alrededor de las líneas 107-116), y luego lee los ejemplos de libtmux.Server() que siguen a ellas. En ambos archivos, reemplaza el paso tmux new-session por libtmux.Server().new_session(session_name="foo", window_name="bar") y mantén el comando tmux attach -t foo como paso opcional. Está terminado cuando ambas páginas crean la sesión desde Python. Quedan fuera del alcance el lanzador de libtmux.org y cualquier API nueva de gestor de contexto.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Python
Estrellas
1.2k
Forks
127
Merge medio
2 h 37 min
PR fusionados (30 d)
33

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de tmux-python/libtmux

Todos los issues de tmux-python/libtmux

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.