Skip to content

Support initial command for new-session, new-window, and split-window #21

@mavericken

Description

@mavericken

tmux allows specifying a shell command when creating sessions, windows, and panes:

tmux new-session 'htop'
tmux new-window 'vim file.txt'
tmux split-window -h 'cargo watch'
The command runs in the new pane, and when it exits, the pane closes.

It would be great to have the same in psmux:

psmux new-session -s work "python server.py"
psmux new-window "vim file.txt"
psmux split-window -h "cargo watch"
This is useful for scripting session layouts, automated workflows, and quickly launching tools in dedicated panes without having to send-keys after creation.

FYI, claude code was able to implement this in a few minutes, but I won't presume you want that code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions