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

Re: multiple OSes



On Thu, 2007-11-01 at 22:34:50 +1300, Atom Smasher sent:
>i recently had the misfortune being assigned to a project on
>solaris(-10).  having a strong freebsd background and being
>comfortable on linux, i'd have to say that solaris pretty much
>sucks.
>
You have my condolences. These days I use FreeBSD, Mac OS X
(FeeBSD!?), Ubuntu and Solaris (8 and 10). Count yourself lucky
you're using 10 and that you have access to zsh ;-)

>but i'm not here to complain, i'm here to ask a question to
>those of you who use zsh on more than one OS: what's in your
>~/.zshrc to set things up differently for different OSes?
>
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`.

Hope this helps;


--paj
-- 
Pete Johns                                   <http://johnsy.com/>
Contact Information                  <http://johnsy.com/contact/>
Any which way                  <http://johnsy.com/20071021112615>
Sunrise over South Melbo... <http://johnsy.com/albums/1779068240>



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