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

passing data to .zshrc



Greetings,

I am not (yet) subscribed to the -users mailing list. Please CC me. Thanks!

I use a simple shell script wrapper to launch mate-terminal:

#/bin/sh
mate-terminal --geometry=156x42

My default shell is zsh - which gets successfully spawned in the
aforementioned terminal.

I'd like to make programatic decisions inside my .zshrc file based on a
variable in my wrapper script. Or I'd like to pass some sort of data to the
.zshrc script.

I could imagine something like:

#/bin/sh
mate-terminal --geometry=156x42 --command /bin/zsh --env FOO=bar

and then in my .zshrc do things for various values of $FOO.

I've googled and checked the man pages for passing environment variables
into zsh via a CLI option, but couldn't find anything.

The graphical nature of the mate-terminal makes it so I can't:

#/bin/sh
export FOO=bar
mate-terminal --geometry=156x42

Similarly the following does not work:

#/bin/sh
mate-terminal --geometry=156x42 --command FOO=bar /bin/zsh

I suppose I could do some convoluted exec'ing with the mate-terminal to
pass in an environment variable, but I'd rather find a (somewhat) elegant
solution.

Does anyone have any ideas or suggestions for me?

Thanks!

-m


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