invoke zsh, having it run a command, and then enter interactive mode instead of exiting

Posted by Autoplectic on Super User See other posts from Super User or by Autoplectic
Published on 2010-01-05T22:48:49Z Indexed on 2011/01/07 1:55 UTC
Read the original article Hit count: 199

Filed under:

i'd like to start zsh similar to

zsh -c 'my_prog option1 option2'

but instead of exiting after running that command, leaving me at the propt of the invoked zsh (not wherever it is being called from). one particular use-case for this is in screenrc files, you could do something like:

screen -t my_prog 0 zsh -c 'my_prog opt1 opt2'

and after running that command you're left with a shell there instead of it closing.

© Super User or respective owner

Related posts about zsh