detect redhat
[zsh.git] / .zsh / README.org
1 * ZSH configuration "framework"
2
3 This is my zsh configuration. Well, more a framework of it.
4 It is setting quite a lot of defaults, but at the same time
5 tries to be as user configurable as makes sense. So most of the
6 settings should be easy (enough) to adjust. I've taken out the most
7 personal stuff, if you want to see my full config you need to merge
8 this repository together with the one over at [[http://git.ganneff.de/cgi-bin/gitweb.cgi?p%3Dzsh-ganneff.git%3Ba%3Dsummary][git.ganneff.de Git -
9 zsh-ganneff.git/summary]]
10
11 ** The boring stuff, license / copyright
12 It is hard to say what exact license applies: It consists of a lot of
13 snippets taken from a lot of places all over the net, many of which I
14 don't remember anymore. Also, many of which are probably small enough
15 that no copyright would apply.
16
17 For those I still remember where it is from, I tried to mark them as such,
18 giving credit where its due. Those I know are also listed at the end
19 of this README file. If you find something in here thats from you and
20 want to be mentioned, just mail me.
21
22 For stuff that is from me, use the following license terms:
23
24 Copyright (C) 2013, Joerg Jaspert <joerg@ganneff.de>
25
26 Permission is hereby granted, free of charge, to any person obtaining a
27 copy of this software and associated documentation files (the
28 "Software"), to deal in the Software without restriction, including
29 without limitation the rights to use, copy, modify, merge, publish,
30 distribute, sublicense, and/or sell copies of the Software, and to
31 permit persons to whom the Software is furnished to do so, subject to
32 the following conditions:
33
34 The above copyright notice and this permission notice shall be included
35 in all copies or substantial portions of the Software.
36
37 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
38 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
39 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
40 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
41 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
42 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
43 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
44 * Usage
45 ** Basics
46 To correctly use this fileset for zsh, you need to understand the
47 order in which things are loaded by zsh.
48
49 Note: Wherever $ZDOTDIR is unset, $HOME is used instead
50
51 - Always
52 1. /etc/zsh/zshenv This is not overridable and not affected by the
53 RCS/GLOBAL_RCS variables explained below!
54 2. $ZDOTDIR/.zshenv
55
56 - If the shell is a *login* shell, it continues with
57 3. /etc/zsh/zprofile
58 4. $ZDOTDIR/.zprofile
59
60 - If the shell is *interactive*, it continues with
61 5. /etc/zsh/zshrc
62 6. $ZDOTDIR/.zshrc
63
64 - If the shell is a *login* shell, it continues with
65 7. /etc/zsh/zlogin
66 8. $ZDOTDIR/zlogin
67
68
69 On logout it is easier: If the shell exits (not due to exec'ing another
70 process, but logout/exit), it reads
71
72 1. $ZDOTDIR/.zlogout
73 2. /etc/zsh/zlogout
74
75 There are 2 variables affecting the above ordering.
76
77 - RCS :: If this is unset, none of the (remaining) startup files
78 are sourced.
79 - GLOBAL_RCS :: If this is unset, none of the startup files in /etc/zsh
80 are sourced.
81
82 Note: These variables do NOT affect /etc/zsh/zshenv, which is
83 ALWAYS read!
84 ** Howto
85 For the impatient. Assuming you are in your homedirectory, be careful,
86 it will create a .zsh/ and a .zshenv then. You can also put them
87 anywhere else you like, you only have to adjust the .zshenv symlink.
88
89 #+BEGIN_SRC shell
90 git clone git://git.ganneff.de/zsh.git
91 ln -sf .zsh/zshenv.home ~/.zshenv
92 #+END_SRC
93
94 The config will detect where your checkout is, if you symlinked
95 =~/.zshenv= to the checked out .zsh/zshenv.home, so you are not forced
96 to put it directly in your home (besides the .zshenv).
97 * Sources
98 ** Prompt
99 The prompt i use is based on various others.
100 - The "design" is taken from Phil!'s ZSH prompt, as found on
101 http://aperiodic.net/phil/prompt/
102
103 - The tech using zstyle is inspired by the prompt as used by
104 the grml-live system <http://grml.org>, see
105 http://git.grml.org/?p=grml-etc-core.git;a=summary for details
106 on theirs.
107 A good number of their support functions are also taken, though
108 they got renamed from grml_* to ganneff_* to have a single namespace
109 here. (And to direct flames about the bugs to me... :) )
110
111 - The winch function as seen in the prompt theme "bart", delivered
112 with zsh
113
114 ** Various
115 - The is-{alias,builtin,callable,command,function} and zpgrep function
116 have been taken from "zoppo", see [[https://github.com/zoppo][zoppo]] for more of it, which is
117 licensed "under WTFPL unless otherwise noted".
118
119 - zbell function is Written by Jean-Philippe Ouellet <jpo@vt.edu>
120 and available under the ISC license.