Create a hook to run a custom script after launching a site shell

It would be really helpful for Local to call a custom script after launching a site shell. For example, there might be a conf/shell folder with a script in it or a conf/ file that starts out empty but is available for users to fill in with whatever they need.

For example, in my case I need to execute this little fish command whenever Local spawns a new Warp terminal window with a local site shell in it:

if status is-interactive
  printf '\eP$f{"hook": "SourcedRcFileForWarp", "value": { "shell": "fish"}}\x9c'

I would love to be able to throw this into conf/ and have Local automatically evaluate it in the site shell before it turns the shell over to me for commands.

But this would allow for users to add all sorts of custom commands to site shells, from special prompts, to additional paths, to who knows what else. Seems like it could be a big win for relatively low effort.


Hello @efc -

Thank you for creating this feature request and being so thorough. We appreciate you!