zsh-users
 help / color / mirror / code / Atom feed
From: Vincent Lefevre <vincent@vinc17.org>
To: zsh-users@sunsite.dk
Subject: Re: syncing .zsh* files
Date: Fri, 6 Aug 2004 20:25:50 +0200	[thread overview]
Message-ID: <20040806182550.GC7244@ay.vinc17.org> (raw)
In-Reply-To: <198F38D4-E7C4-11D8-8E3F-000D93AD26C8@tntluoma.com>

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
    psvar[1]="[$(pmu_percent)%]"
  else
    psvar[1]=""
  fi

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@vinc17.org> - 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


  parent reply	other threads:[~2004-08-06 18:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-06 16:17 Timothy Luoma
2004-08-06 16:39 ` Björn Lindström
2004-08-06 16:49 ` Matt Pharr
2004-08-06 18:25 ` Vincent Lefevre [this message]
2004-08-07 22:07   ` Bart Schaefer
2004-08-07  8:06 ` Michael Prokop

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040806182550.GC7244@ay.vinc17.org \
    --to=vincent@vinc17.org \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).