Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

--init-file option



Dear Zsh maintainers,

I was wondering if there is an equivalent to Bash's --init-file option or fish shell's --init-command option in Zsh or if one can hack around to achieve the same effect. I would need to be able to source a virtual environment activation file after the Zsh startup files were processed (but before a command is executed) in order to be able to start a shell or run commands inside a Python virtual environment.

I maintain a tool for managing Python virtual environments (https://docs.logikal.io/pyorbs/) and I had no problems with supporting Bash and fish (https://github.com/logikal-io/pyorbs/blob/main/pyorbs/shell.py#L45), but I'm not sure how to achieve the same behavior with Zsh. I'm aware of zshi (https://github.com/romkatv/zshi/blob/master/zshi), but I'm wondering if there's any other option that does not involve hacking around the zsh startup files.

Thank you and kind regards,
Gergely


Messages sorted by: Reverse Date, Date, Thread, Author