Skip to content

FR: add a --start-cmd flag #360

@ethanpailes

Description

@ethanpailes

AI Policy Ack
Ack

What new feature do you want?

There should be a --start-cmd flag that allows you to specify a command to be injected into the shell right after shpool detects that the shell has started up successfully via its sentinel scanner. This is distinct from the existing -c/--cmd flag because it doesn't replace the shell, but is just injected into it. This will allow users to automatically cd to a workspace of their choice.

A key componant of this is that the start cmd should support templates the same way that templated session names do. This way, you can reference shpool variables in your startup command, and when you automatically switch to a new session based on a variable change, it will also automatically set up that session in the right directory or running the right program. For example, you might have an editor session that does cd /workspace/prefix/path/#{workspace} && $EDITOR as its startup cmd. You could do the same thing for an agent CLI or any other tool you like to dedicate an entire shpool session to.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions