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

allow zsh to source a script and then become interactive

This is an oldie but goodie that I don't have a solution to. How can I
invoke a zsh that sources a particular file (not the standard start up
files) and then become interactive, preserving functions, etc?

This is akin to the ksh invocation:

 ENV=startup ksh

or bash's

 bash --rcfile startup

One solution was covered in 2005 by Bart: see
http://www.zsh.org/mla/users/2005/msg00600.html However this only works
if you can change the .zshrc file.

Another alternative is to create a custom .zshrc in a temporary
directory and set the environment variable ZDOTDIR. But this is a little

I look after an increasing disparate collection of systems and I'd
like to launch a customised zsh on a remote system without changing
anything ahead of time.

Any ideas or should we propose a --rcfile option to zsh?


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