Warp icon indicating copy to clipboard operation
Warp copied to clipboard

Automatically run commands on start

Open allmightychaos opened this issue 2 years ago • 13 comments

Discord username (optional)

Chaos#3003

Describe the solution you'd like?

I would love to be able to create new commands, that will run with the start of zsh / warp (after it has been fully closed).

This for example could be made another option in the settings, called "Autorun" - or whatever - and you can add x-amount of commands (how many you would like to make possible), that run on start automatically. 

So if you add:
- clear
- omz reload
- whatever else

it should run those three commands in order as soon as warp and zsh has been started up. 

btw, you might also want to add a something to change the order of the commands. But this can come later :)

Is your feature request related to a problem? Please describe.

Just when I start warp, I would love oh my zsh to start automatically. 
Maybe I just oversaw something, so it won't automatically start, but to autorun commands on start can be helpful anyway :)

Additional context

No response

How important is this feature to you?

3

Warp Internal (ignore) - linear-label:770f6576-d6c0-4e4f-a259-fc64b5156087

None

allmightychaos avatar Feb 23 '23 06:02 allmightychaos

Thanks for submitting this @allmightychaos, Warp doesn't have an autostart currently, great idea thou! Please :+1: and subscribe to this request as it helps us gauge interest. We will post any updates here if this is being worked on.

Also as possible alternative, We have Launch Configurations which can be used to open windows/tabs/panes and run commands. Or you can simply add a script to your ~/.zshrc which should run when opening any Warp window/tab/pane.

dannyneira avatar Feb 23 '23 17:02 dannyneira

Thanks, as just a little addition - just like in the standard macOS Terminal (as an idea): image

allmightychaos avatar Feb 24 '23 06:02 allmightychaos

Any updates? It is annoying to type in 'zsh' everytime i open warp to see my powerlevel10k theme

nima9 avatar Sep 28 '23 10:09 nima9

please implement this feature, my dear development team

nth347 avatar Oct 04 '23 15:10 nth347

+1 to add this functionality

rusakovic avatar Oct 11 '23 14:10 rusakovic

+1 for this feature

RateThePaladin avatar Nov 14 '23 23:11 RateThePaladin

I'd love for it to open a configuration (tabs I saved before) and run commands for each tab. Looks like a workflow but not the one currently implemented (that is almost an alias).

bsides avatar Nov 17 '23 12:11 bsides

Another way to achieve a similar goal: in the ~/.zshrc file, determine if the currently open terminal program is Warp, and then execute a specific script.

if [[ "$TERM_PROGRAM" == "WarpTerminal" ]]; then
  # Your scripts here
end

Snowflyt avatar Jan 10 '24 04:01 Snowflyt

I searched for it for a long time Any progress ?

kobiShenkar avatar Feb 22 '24 17:02 kobiShenkar

This currently is the only thing stopping me from fully switching to warp

RoyvanEmpel avatar Feb 23 '24 01:02 RoyvanEmpel

I'd love to be able to attach to zellij at startup. That would be great! ❤️

zenangst avatar Mar 13 '24 17:03 zenangst

if [[ "$TERM_PROGRAM" == "WarpTerminal" ]]; then
  # Your scripts here
end

That actually opens a new zsh shell into the previous shell, do exec zsh to restore the pl10k prompt.

ManuGraiph avatar Mar 19 '24 13:03 ManuGraiph

I'd just like to express support for this feature.

I'd personally like to see it as an addition to Launch Configurations.

I currently open my tabs/panes setup from a Launch Configuration but Ideally I would like each of those tabs and panes to run a different command when they start.

This would allow me to just open my launch config and very quickly have my backend and frontend running locally in one tab, my text editor in the next tab and my api client in the next tab.

Currently I have to run these manually.

alexrusselldev avatar Oct 08 '24 09:10 alexrusselldev

I currently open my tabs/panes setup from a Launch Configuration but Ideally I would like each of those tabs and panes to run a different command when they start.

I think you can do that: https://docs.warp.dev/features/sessions/launch-configurations#commands

mathroc avatar Dec 14 '24 16:12 mathroc