How to load different zshrc file via commandline option?

bash, zsh

Solution

You can approximate that feature by using the `ZDOTDIR` variable.

In a directory perhaps like this:

mkdir /home/sindhu/bin/misc_scripts/shellrc/.zshrc_1

create a file called `.zshrc` containing your alternative startup script. Then you can start zsh like this:

ZDOTDIR=/home/sindhu/bin/misc_scripts/shellrc/.zshrc_1 zsh

Problem

I used to do this with bash... ``` /bin/bash --rcfile /home/sindhu/bin/misc_scripts/shellrc/.bashrc_1 ``` how can I accomplish the same with zsh? Thank you.

Original source