kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
24.57k stars 983 forks source link

`kitty @ launch` start a shell and also run a command #3151

Closed prime31 closed 3 years ago

prime31 commented 3 years ago

This is probably just my issue/misunderstanding/lack of knowledge. I am basically trying to fire off a new Kitty window from kakoune that loads up a second kakoune instance, but that is mostly not relevant. The main gist of things is need to launch a zsh shell then run kak in that shell. I've tried every combination of escaping that i can think of with no luck.

Essentially what I want to do is something like this: kitty @ launch kak some_file

That doesn't work though because it seems kitty @ launch doesn't open a shell but just runs the command directly. Is there some way to kitty @ launch, open a shell and then run a command?

kovidgoyal commented 3 years ago

kitty @ launch zsh -c "whatever"

prime31 commented 3 years ago

Thanks for the quick response. When I run something like kitty @ launch zsh -c "ls && pwd" or kitty @ launch zsh -c "kak" it seems like the new Kitty window opens then immediately closes.

Is there a way to get the new window to remain open? Apologies for the newb questions...

kovidgoyal commented 3 years ago

zsh -c "ls; read"

aisamu commented 7 months ago

For future reference: --hold now exists!