BATTERY=${BATTERY:-0}
GRMLSMALL_SPECIFIC=${GRMLSMALL_SPECIFIC:-1}
GRML_ALWAYS_LOAD_ALL=${GRML_ALWAYS_LOAD_ALL:-0}
+GRML_WARN_SKEL=${GRML_WARN_SKEL:-1}
+
+if (( GRML_WARN_SKEL != 0 )) ; then
+ printf '
+Dear user,
+
+You updated grml'\''s zshrc which brings a major change.
+The configuration is kept only in one file, being the global zshrc.
+In the past, the configuration was split in two files, with the
+second file being the .zshrc file from /etc/skel.
+
+If you have a .zshrc file in your home directory that originally
+came from the skel directory, please remove it. This is also the case
+if you followed earlier instructions from the grml-zsh-refcard or
+from <http://grml.org/console> on non-grml systems.
+
+Please see the current grml-zsh-refcard for updated installation
+information. In short, you don'\''t want a .zshrc.global file. Install
+the global zshrc to ~/.zshrc and be done.
+
+If you need changes to the configuration, use ~/.zshrc.pre and
+~/.zshrc.local.
+
+To remove this warning execute '\''grml_do_not_warn_skel'\''.
+
+' | more
+
+function grml_do_not_warn_skel() {
+ printf '# Do not warn about old skel dot-files anymore\n' >>! ~/.zshrc.pre
+ printf 'GRML_WARN_SKEL=0\n' >>! ~/.zshrc.pre
+}
+
+fi
+
# }}}
# {{{ check for version/system
isgrmlsmall() { return 1 }
fi
+isdarwin(){
+ [[ $OSTYPE == darwin* ]] && return 0
+ return 1
+}
+
#f1# are we running within an utf environment?
isutfenv() {
case "$LANG $CHARSET $LANGUAGE" in
# color setup for ls:
check_com -c dircolors && eval $(dircolors -b)
+# color setup for ls on OS X:
+isdarwin && export CLICOLOR=1
+
+# do MacPorts setup on darwin
+if isdarwin && [[ -d /opt/local ]]; then
+ # Note: PATH gets set in /etc/zprofile on Darwin, so this can't go into
+ # zshenv.
+ PATH="/opt/local/bin:/opt/local/sbin:$PATH"
+ MANPATH="/opt/local/share/man:$MANPATH"
+fi
+# do Fink setup on darwin
+isdarwin && xsource /sw/bin/init.sh
# set width of man pages to 80 for more convenient reading
# export MANWIDTH=${MANWIDTH:-80}
# disable - Provide a list of systems, you don't want
# the vcs_info() to check for repositories
# (checked in the 'init' context, too).
+# disable-patterns - A list of patterns that are checked against $PWD.
+# If the pattern matches, vcs_info will be disabled.
+# Say, ~/.zsh is a directory under version control,
+# in which you do not want vcs_info to be active, do:
+# zstyle ':vcs_info:*' disable-patterns "$HOME/.zsh+(|/*)"
# use-simple - If there are two different ways of gathering
# information, you can select the simpler one
# by setting this style to true; the default
# max-exports 2
# enable true
# disable (empty list)
+# disable-patterns (empty list)
# use-simple false
# use-prompt-escapes true
#
}
# }}}
vcs_info () { # {{{
+ local pat
local -i found
- local -a VCSs disabled
+ local -a VCSs disabled dps
local -x vcs usercontext
local -ax msgs
local -Ax vcs_comm
return 0
}
zstyle -a ":vcs_info:${vcs}:${usercontext}" "disable" disabled
+
+ zstyle -a ":vcs_info:${vcs}:${usercontext}:${rrn}" "disable-patterns" dps
+ for pat in ${dps} ; do
+ if [[ ${PWD} == ${~pat} ]] ; then
+ [[ -n ${vcs_info_msg_0_} ]] && VCS_INFO_set --clear
+ return 0
+ fi
+ done
+
VCS_INFO_maxexports
(( found = 0 ))
=======================================$reset_color"
print '
-Main configuration of zsh happens in /etc/zsh/zshrc (global)
-and /etc/skel/.zshrc which is copied to $HOME/.zshrc once.
-The files are part of the package grml-etc-core, if you want to
+Main configuration of zsh happens in /etc/zsh/zshrc.
+That file is part of the package grml-etc-core, if you want to
use them on a non-grml-system just get the tar.gz from
-http://deb.grml.org/ or get the files from the mercurial
-repository:
+http://deb.grml.org/ or (preferably) get it from the git repository:
+
+ http://git.grml.org/f/grml-etc-core/etc/zsh/zshrc
+
+This version of grml'\''s zsh setup does not use skel/.zshrc anymore.
+The file is still there, but it is empty for backwards compatibility.
+
+For your own changes use these two files:
+ $HOME/.zshrc.pre
+ $HOME/.zshrc.local
- http://git.grml.org/?p=grml-etc-core.git;a=blob_plain;f=etc/zsh/zshrc
- http://git.grml.org/?p=grml-etc-core.git;a=blob_plain;f=etc/skel/.zshrc
+The former is sourced very early in our zshrc, the latter is sourced
+very lately.
-If you want to stay in sync with zsh configuration of grml
-run '\''ln -sf /etc/skel/.zshrc $HOME/.zshrc'\'' and configure
-your own stuff in $HOME/.zshrc.local. System wide configuration
-without touching configuration files of grml can take place
-in /etc/zsh/zshrc.local.
+System wide configuration without touching configuration files of grml
+can take place in /etc/zsh/zshrc.local.
-If you want to use the configuration of user grml also when
-running as user root just run '\''zshskel'\'' which will source
-the file /etc/skel/.zshrc.
+Normally, the root user (EUID == 0) does not get the whole grml setup.
+If you want to force the whole setup for that user, too, set
+GRML_ALWAYS_LOAD_ALL=1 in .zshrc.pre in root'\''s home directory.
For information regarding zsh start at http://grml.org/zsh/
A value greater than 0 is enables a feature; a value equal to zero
disables it. If you like one or the other of these settings, you can
-add them to ~/.zshenv to ensure they are set when sourcing grml'\''s
+add them to ~/.zshrc.pre to ensure they are set when sourcing grml'\''s
zshrc.'
print "
alias llog="$PAGER /var/log/syslog" # take a look at the syslog
#a1# Take a look at the syslog: \kbd{tail -f /var/log/syslog}
alias tlog="tail -f /var/log/syslog" # follow the syslog
- #a1# (Re)-source \kbd{/etc/skel/.zshrc}
- alias zshskel="source /etc/skel/.zshrc" # source skeleton zshrc
fi
# sort installed Debian-packages by size
# source another config file if present {{{
xsource "/etc/zsh/zshrc.local"
-xsource "${HOME}/.zshenv"
# }}}
# "persistent history" {{{
fi
# }}}
-## genrefcard.pl settings {{{
-### example: split functions-search 8,16,24,32
-#@# split functions-search 8
-## }}}
-
#:grep:marker:for:mika: :-)
### non-root (EUID != 0) code below
###
# }}}
-### doc strings for external functions from files {{{
+## genrefcard.pl settings {{{
+
+### doc strings for external functions from files
#m# f5 grml-wallpaper() Sets a wallpaper (try completion for possible values)
-#}}}
+
+### example: split functions-search 8,16,24,32
+#@# split functions-search 8
+
+## }}}
## END OF FILE #################################################################
# vim:filetype=zsh foldmethod=marker autoindent expandtab shiftwidth=4