From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 172 invoked from network); 7 Aug 2004 22:09:48 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 7 Aug 2004 22:09:48 -0000 Received: (qmail 19472 invoked from network); 7 Aug 2004 22:09:42 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 7 Aug 2004 22:09:42 -0000 Received: (qmail 28049 invoked by alias); 7 Aug 2004 22:09:01 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7815 Received: (qmail 28039 invoked from network); 7 Aug 2004 22:09:00 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by 130.225.247.90 with SMTP; 7 Aug 2004 22:09:00 -0000 Received: (qmail 18100 invoked from network); 7 Aug 2004 22:07:41 -0000 Received: from unknown (HELO moonbase.zanshin.com) (167.160.213.139) by a.mx.sunsite.dk with SMTP; 7 Aug 2004 22:07:39 -0000 Received: from toltec.zanshin.com (toltec.zanshin.com [64.84.47.166]) by moonbase.zanshin.com (8.12.11/8.12.11) with ESMTP id i77M7bcE031359 for ; Sat, 7 Aug 2004 15:07:37 -0700 Date: Sat, 7 Aug 2004 15:07:37 -0700 (PDT) From: Bart Schaefer Reply-To: zsh-users@sunsite.dk To: zsh-users@sunsite.dk Subject: Re: syncing .zsh* files In-Reply-To: <20040806182550.GC7244@ay.vinc17.org> Message-ID: References: <198F38D4-E7C4-11D8-8E3F-000D93AD26C8@tntluoma.com> <20040806182550.GC7244@ay.vinc17.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-1.4 required=6.0 tests=BAYES_20 autolearn=no version=2.63 X-Spam-Hits: -1.4 I have all my zsh configurations stored in CVS on a host I can access with CVS_RSH=ssh. They're designed to be checked out into a directory ~/.zsh on each host, and then I have a little installer script that sets up a ~/.zshenv file which does nothing more than assign ZDOTDIR=~/.zsh and then source the ~/.zsh/.zshenv file. (If ZDOTDIR is already set, the ~/.zshenv is never seen, so there's no reason to e.g. guard this with an "if".) There can be a subdirectory named "local" in the .zsh directory from which host-specific files, if they exist, are sourced by the ~/.zsh/.zshrc (etc.) files. I keep a set of subdirectories named for the host or domain (e.g. all hosts at work use the same one); those are checked into CVS and then I symlink the name "local" to the correct one for each install. At first I tried organizing everything by host architecture or OS, but I ended up dividing it by, for lack of a better term, purpose -- things needed in all shells, in interactive shells, just once when starting a new session (e.g., before X11 startup), etc., and then sometimes subdividing into options, bindings, completion, terminal handling, etc. There's one file that sets up aliases or functions to mask differences in default behavior of ps, ls, df, etc. on different architectures, but most of the case-statements on $HOSTTYPE are scattered in various files because I could never find a common place in the startup sequence to do all of that at once.