tmux-python / tmux-python/libtmux
Have an optional parameter `cmd` in `Session.new_window()`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 127
- Avg merge
- 2h 13m
- Merged PRs (30d)
- 1
Description
Hi, thanks for this library.
In tmux we can create a new window and immediately run a command in it using:
tmux new-session -d -s cool_session
tmux new-window -t cool_session -n fun_window "echo kills fun_window after 5s && sleep 5"
This is useful when one wants the window to automatically kill itself once the command has finished running.
It would be nice to have this feature in libtmux as well. Maybe an optional parameter like Session.new_window(cmd=None).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Session.new_window() entry point and compare its behavior with the tmux new-window command shown in the issue. Add support for an optional cmd argument so the command runs immediately in the new window, then verify that existing calls without cmd continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, cli
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100