tags:

views:

77

answers:

2

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.z

A: 

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
Dennis Williamson
A: 

Write a small wrapper script:

source $1
zsh -f -d

The first line sources your alternative RC file. The second starts a new Z shell without sourcing any other RC files. See zshoptions(1) for the options -d and -f (GLOBAL_RCS, RCS).

jkramer