Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: multiple OSes
- X-seq: zsh-users 12170
- From: Atom Smasher <atom@xxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: multiple OSes
- Date: Fri, 2 Nov 2007 09:16:11 +1300 (NZDT)
- In-reply-to: <20071101111924.GS46584@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Openpgp: id=0xB88D52E4D9F57808; algo=1 (RSA); size=4096; url=http://atom.smasher.org/pgp.txt
- References: <20071101093453.40647.qmail@xxxxxxxxxxx> <20071101111924.GS46584@xxxxxxxxxx>
On Thu, 1 Nov 2007, Pete Johns wrote:
I tend to do things per host (since each of the hosts at work is so
different).
I have this inside my .zshrc:
if [[ -r ${ZDOTDIR}/.zshrc.${HOST%%.*} ]]; then
source ${ZDOTDIR}/.zshrc.${HOST%%.*}
fi
I then have separate files for each host ($ZDOTDIR/.zshrc.somehost)
which do just the things specific to that host; paths and so on.
If you wanted to do this per OS, you could modify this either using
$OSTYPE or the output of `uname`.
======================
including comments, my zshrc is currently 430 lines, 15KB. i'm (currently)
subscribing to the theory that it's best to have one file that i use for
all logins on all systems, and make it adapt itself accordingly. the
alternative is re-writing little peices for different systems and trying
to keep them in sync.
the only thing i have doubts about is that the $OSTYPE is determined at
compile time, not run time. there's potential for that to cause weird
problems, but nothing that would be fixed by
${ZDOTDIR}/.zshrc.${HOST%%.*}.
--
...atom
________________________
http://atom.smasher.org/
762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
-------------------------------------------------
"If we don't stop extending our troops all around the
world in nation-building missions, then we're going
to have a serious problem coming down the road."
-- George W. Bush, to Al Gore, during Campaign 2000.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author