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

Re: adding a toplevel zsh.spec.in file



Bart Schaefer (schaefer@xxxxxxxxxxxxxxxxxxxxxxx) wrote:
> On Jul 7,  6:44pm, Zefram wrote:
> } Subject: Re: adding a toplevel zsh.spec.in file
> }
> } Is there anything that ought to go in /etc/z* on more machines than,
> } say, those in a single company?
> 
> I've always asserted that there is not, with the possible exception of
> default path settings in /etc/zshenv.

In /etc/zshenv:

What about setting of umask?  In the last discussion about this kind
of stuff you suggested that umask setting was better done in zshrc.
But shouldn't it be set correctly for non-interactive processes too?

These don't do much harm either (quoted mostly straight from Bart
anyway ;-)

  export USER=`id -un`
  export LOGNAME=$USER
  export HOSTNAME=$HOST
  
  # this only on appropriate boxes of course
  export MAIL=/var/spool/mail/$USER
  
  HISTSIZE=1000
  HISTFILE=~/.zshhistory
  SAVEHIST=1000
  
  export INPUTRC=/etc/inputrc
  
Is there any good reason why /sbin and /usr/sbin should not be on
every user's path by default?  They're not under RedHat, which is
infuriating when it comes to using traceroute, lsof etc.

Now here's a candidate for StartupFiles/RedHat/zshrc.  Anything badly
wrong?

--------- 8< --------- 8< --------- 8< --------- 8< --------- 8< ---------
#
# /etc/zshrc is sourced in interactive shells.  It
# should contain commands to set up aliases, functions,
# options, key bindings, etc.
#

# 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

# Where to look for autoloaded function definitions
fpath=(
       ~/{lib/zsh,.zsh}/{functions,scripts}(N)
       ~/.z{sh,}func*(N)
       $fpath
       /usr/doc/zsh*/Functions(N)
      )

typeset -U fpath

# Autoload all shell functions from all directories
# in $fpath that have the executable bit on
# (the executable bit is not necessary, but gives
# you an easy way to stop the autoloading of a
# particular shell function).
for dirname in $fpath
do
  fns=( $dirname/*(N.x:t) )
  (( $#fns )) && autoload $fns
done

# Set prompts
PS1='%n@%m %B%3~%b %# '        # default prompt
#RPS1=' %~'                     # prompt for right side of screen

#bindkey -v               # vi key bindings
#bindkey -e               # emacs key bindings
#bindkey ' ' magic-space  # also do history expansion on space

--------- 8< --------- 8< --------- 8< --------- 8< --------- 8< ---------



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