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

How to distribute skeleton zshrc etc. (Re: PATCH: Re: adding a toplevel zsh.spec.in file)



On Jul 17, 11:15pm, Wayne Davison wrote:
} Subject: Re: PATCH: Re: adding a toplevel zsh.spec.in file
}
} I think that RedHat/Mandrake would do well to remove all the alias,
} setopt, and similar setup that is going on in these /etc files and
} move it into the skel files that get installed for new users.

The problem with this approach is that the skel files are installed
only when a new user is created, but the package for zsh is an add-on
that can be installed or deinstalled independently.  How do you update
all the users' copies of the skel files when a new version of the zsh
package is installed?  How do you "distribute" skel files to existing
users when zsh is added for the first time?

You can't simply set ZDOTDIR=/etc/skel in /etc/zshenv, that would mess up
a user who has compiled his own copy of zsh (not to mention effectively
making *all* the RCs read-only).  Perhaps a test in /etc/zshrc (or some
similar place that survives the latest proposed changes) for whether any
of the ~/.z{sh{env,rc},profile,login} files exists, and if none do, then
symlink them all from /etc/skel ...

Perhaps zsh should ignore the value of ZDOTDIR until after ~/.zshenv has
been sourced, but also source $ZDOTDIR/.zshenv if no ~/.zshenv exists ...
I hesitate to suggest this because it might actually break my current
personal zsh configuration, but it ought to be a little harder than it
is for a sysadmin to accidentally bypass all user-writable files.  Hmm,
perhaps do the delayed-ZDOTDIR thing only for un-restricted shells?

I'm obviously thinking "out loud" here.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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