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

Re: PATCH: Re: adding a toplevel zsh.spec.in file



Zefram <zefram@xxxxxxxx> writes:

> Adam Spiers wrote:
> >In /etc/zshenv:
> >
> >  export USER=`id -un`
> >  export LOGNAME=$USER
> >  export HOSTNAME=$HOST
> >  
> >  # this only on appropriate boxes of course
> >  export MAIL=/var/spool/mail/$USER
> 
> These, if they exist at all (which is OK if done right), should be in
> /etc/zprofile, and duplicated in /etc/profile.  They should be set
> on *login*, not for every shell I start -- if I want to set MAIL to
> somewhere different, that setting should propagate to any subshells I run.
> 
> >  HISTSIZE=1000
> >  HISTFILE=~/.zshhistory
> >  SAVEHIST=1000
> 
> No way.  zsh has a perfectly well-established default behaviour
> w.r.t. history saving, and if I don't override it I should get zsh's
> default, not whatever some RPM builder thought might be nice.
> 
> >  export INPUTRC=/etc/inputrc

In Red Hat Linux, we do this:

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
        INPUTRC=/etc/inputrc
fi

The reason for this is to make bash 1.x handle 8 bit input - we don't
set anything else.
 
> My environment is my own.

Of course, and you're free to change it in your own files - but that
doesn't mean systems should be set up with sensible values (like
specifying NNTPSERVER, MAIL, QTDIR etc. etc). 

> >Now here's a candidate for StartupFiles/RedHat/zshrc.  Anything badly
> >wrong?
> ...
> ># Set up aliases
> >alias mv='nocorrect mv'       # no spelling correction on mv
> >alias cp='nocorrect cp'       # no spelling correction on cp
> >alias mkdir='nocorrect mkdir' # no spelling correction on mkdir
> 
> Evil.

Agreed. Such changes should be in a user's own configuration files.

> >PS1='%n@%m %B%3~%b %# '        # default prompt
> 
> Just don't.  As before, you're overriding a perfectly reasonable
> default and imposing your arbitrary tastes on people.

If it makes sense, do it - it's just another default, a user can
override it. The default BASH prompt is "bash-2.04#", and changing
this to something more sensible is good (IMHO, of course - and if you
don't like it, pick your own).

> So here's my recomendation for zsh RPM builders: ship no /etc/zshrc,
> /etc/zshenv, /etc/zlogin or /etc/zlogout, and have /etc/zprofile
> be a symbolic link -> profile.  (This still leaves a broken Red Hat
> /etc/profile, but that's outside the scope of a zsh package.)

It's not broken, it's just not designed to handle zsh - it's designed
to handle bash only. Fixing this (setting another default prompt for
zsh) should be simple if required.


-- 
Trond Eivind Glomsrød
Red Hat, Inc.



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