Skip to content

attach-session -t $N fails to resolve tmux session ID targets #323

@zandivx

Description

@zandivx

Real tmux assigns $N IDs sequentially at session creation time and resolves them server-side. libtmux uses these IDs internally (e.g. after new-session returns $0 in the session ID field).
When libtmux calls attach-session -t $0, psmux treats $0 as a literal session name rather than a tmux session ID. This produces either ns__$0 (with -L namespace) or $0 (without) and neither matches any real session.

Reproduction

# Start a psmux session
tmux new-session -d -s mysession
# This works (literal name):
tmux attach-session -t mysession
# This fails (session ID — what libtmux uses):
tmux attach-session -t '$0'
# Error: no session found

Related to #318.

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