X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=a2045133fd18bee4d5ee4dc595b60f9a4021cfc5;hb=dbb49d444f52afd54c0a5b11705a769a0f801e32;hp=c12227e8e2f9ec8cb1cfb8f0aa87cc58bedfbc21;hpb=172b53a13462d2bf42bacb8cab2c3241b454974e;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index c12227e..a204513 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -11,6 +11,18 @@ # Global Order: zshenv, zprofile, zshrc, zlogin ################################################################################ +# Contributing: +# If you want to help to improve grml's zsh setup, clone the grml-etc-core +# repository from git.grml.org: +# git clone git://git.grml.org/grml-etc-core.git +# +# Make your changes, commit them; use 'git format-patch' to create a series +# of patches and send those to the following address via 'git send-email': +# grml-etc-core@grml.org +# +# Doing so makes sure the right people get your patches for review and +# possibly inclusion. + # zsh-refcard-tag documentation: {{{ # You may notice strange looking comments in this file. # These are there for a purpose. grml's zsh-refcard can now be @@ -853,8 +865,8 @@ alias run-help >&/dev/null && unalias run-help zrcautoload run-help # use via 'esc-h' # completion system -if zrcautoload compinit && compinit 2>/dev/null ; then - compinit 2>/dev/null || print 'Notice: no compinit available :(' +if zrcautoload compinit ; then + compinit || print 'Notice: no compinit available :(' else print 'Notice: no compinit available :(' function zstyle { } @@ -1052,10 +1064,20 @@ function chpwd_profiles() { # in the third part of the context, a function called chpwd_profile_grml, # for example, is called (if it exists). # - # If no pattern patches (read: no profile is detected) the profile is + # If no pattern matches (read: no profile is detected) the profile is # set to 'default', which means chpwd_profile_default is attempted to # be called. # + # A word about the context (the ':chpwd:profiles:*' stuff in the zstyle + # command) which is used: The third part in the context is matched against + # ${PWD}. That's why using a pattern such as /foo/bar(|/|/*) makes sense. + # Because that way the profile is detected for all these values of ${PWD}: + # /foo/bar + # /foo/bar/ + # /foo/bar/baz + # So, if you want to make double damn sure a profile works in /foo/bar + # and everywhere deeper in that tree, just use (|/|/*) and be happy. + # # The name of the detected profile will be available in a variable called # 'profile' in your functions. You don't need to do anything, it'll just # be there.