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

Re: syncing .zsh* files

On 2004-08-06 12:17:23 -0400, Timothy Luoma wrote:
> I'm interested in keeping my .zsh(rc|env) files synced across 3 
> different machines.
> Anyone have any good techniques for doing so, especially when there are 
> some things ($PATH) which are different on each machine?

I manage all my config files with Subversion and I have a script that
reinstall them (with a possible preprocessing) when I want to. For
zsh, I have a .zdomain file on each account, that sets up a $domain
variable, which I can test when need be.

> Should I have separate .zshenv files and the same .zshrc file perhaps?

In general, both files will have settings common to each account and
settings that may differ, even in the .zshrc file; for instance, in my
case, the precmd function contains something that depends on $domain:

  if [[ $domain == local.ay && "$(pmu_battery)" == "Battery" ]] then

Also, some aliases are defined for some accounts only.

> Do .zshrc and .zshenv both get used when logging in (ssh)?

.zshenv, .zshrc and .zlogin (and possibly other files, RTFM...)
for a login shell (default case with ssh).

Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% validated (X)HTML - Acorn / RISC OS / ARM, free software, YP17,
Championnat International des Jeux Mathématiques et Logiques, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA

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