f00fac579897ea595158f7edd7cd057f07016058
[zsh.git] / .zsh / zshenv.local.sample
1 # -*- mode: sh;-*-
2
3 ## This file contains settings local to the system. Note that this is
4 ## read very early, so you can not depend on anything that is set
5 ## somewhere in this zsh config. If you want that, use the file
6 ## ${ZDOTDIR}/zshlate or $ZDOTDIR/zlogin.
7 ## zlogin is read whenever the shell is a login shell, zshlate is
8 ## used on all interactive shells.
9
10 ## The contents here consist of a mix of variables and zstyle lines.
11 ## Feel free to add your own at the bottom.
12
13 ## Output some more information during zshell startup
14 DEBUG=${DEBUG:-no}
15
16 ## The following entries are added to the PATH variable, in front of
17 ## anything else. Non-existing directories are ignored, so you can
18 ## list more than the current machine has.
19 ## If you don't want any additions, make it an empty array
20 typeset -a lpath
21 lpath=(
22 "$HOME/bin"
23 /sbin
24 /usr/sbin
25 )
26
27 ## Same goes for man and info path
28 typeset -a lmanpath
29 lmanpath=(
30 ~/man
31 ~/local/share/man
32 )
33
34 ########################################################################
35 ## The following styles are defined. ##
36 ## Values shown are the defaults taken if the style is unset ##
37 ########################################################################
38
39 ## Set a sane umask
40 # zstyle ':ganneff:config' umask '022'
41
42 ## check every 5 min for login/logout activity
43 # zstyle ':ganneff:config' LOGCHECK 300
44
45 ## The format of login/logout reports
46 # zstyle ':ganneff:config' WATCHFMT '%n %a %l from %m at %t.'
47
48 ## Do you want to have zsh compile your startup files?
49 ## It may make it faster. It may make it slower. Check yourself.
50 ## This uses zrecompile, so changed files are automagically detected
51 # zstyle ':ganneff:config' zrecompile false
52
53 ## The two variables COLORS and LINEDRAW, by default, are set according
54 ## to the capabilities of your terminal. COLORS if it supports colors
55 ## (tput colors > 0), ## LINEDRAW, who would have thought, if it can
56 ## draw "nice-looking" lines (tput acsc exists and NOT linux console).
57 ## If you want to overwrite that detection, enable the following styles.
58 # zstyle ':ganneff:config' COLORS false
59 # zstyle ':ganneff:config' LINEDRAW true/false
60
61 ## Store the dirstack between sessions and restore it
62 ## There are two ways: The first, dirpersist, will restore it in
63 ## a way that puts your new shell into the directory you quit your
64 ## last. The other way, dirstack, will restore the stack, but not
65 ## change the directory your shell starts in (so usually it will be ~).
66 ## If unset your dirstack won't be touched
67 ## Value is dirpersist or dirstack - or keep it commented for nothing.
68 # zstyle ':ganneff:config' dirstackhandling dirstack
69
70 ## Maximum number of events stored in the history file
71 ## HISTSIZE is set to 1.10 times the size of this, to have the
72 ## difference as a cushion for saving duplicated history events, so dupe
73 ## expiration can happen without killing (old) unique entries
74 # zstyle ':ganneff:config' SAVEHIST 50000
75
76 ## The preferred pager
77 # zstyle ':ganneff:config' PAGER "$(which less)"
78
79 ## some options for less
80 # zstyle ':ganneff:config' LESS '-X -R -f -j 3'
81
82 ## use solarized colorscheme for ls?
83 # zstyle ':ganneff:config' solarizedls true
84
85 ## on very wide displays it is annoying to have too wide manpages.
86 ## set to 0 if you want them really wide
87 # zstyle ':ganneff:config' MANWIDTH 80
88
89 ## The format of process time reports with the time builtin.
90 # zstyle ':ganneff:config' TIMEFMT "%J %U user %S system %P cpu %*E total | Mem: %M kb max"
91
92 ## Report time statistics if command runs longer than 30 seconds
93 ## (combined user/system execution times)
94 # zstyle ':ganneff:config' REPORTTIME 30
95
96 ## Preferred list of locales to set. The first found is taken, you
97 ## should end with C in case there is no locale configured.
98 #zstyle ':ganneff:config' locales "LANG de_DE.utf8 en_GB.utf8 C.UTF-8 C" \
99 # "LC_MESSAGES en_GB.utf8 de_DE.utf8 C.UTF-8 C"
100
101 ## Use zsh syntax hilighting (input line coloring)
102 # zstyle ':ganneff:config' zsh-syntax-hilight true
103
104 ## Preferred list of editors to use as $EDITOR.
105 ## If you want arguments to the command, give them inside ""
106 # zstyle ':ganneff:config' editors "emacs-snapshot -Q -D -nw" \
107 # "emacs24 -Q -D -nw" \
108 # "emacs23 -Q -D -nw" \
109 # "emacs22 -Q -D -nw" \
110 # mcedit \
111 # vim vi \
112 # editor
113
114 ## Want to (try) using emacsclient?
115 # zstyle ':ganneff:config' emacsclient true
116
117 ## Want to have a fortune at zsh start?
118 # zstyle ':ganneff:config' fortune true
119
120 ## Want to see how long it (roughly) took to load?
121 # zstyle ':ganneff:config' starttime false
122
123 ## Should we use lessfile or lesspipe (if installed)?
124 ## Difference is in the handling, see the manpages for details, but
125 ## one of them uses pipes and one files to hand their output to less.
126 ## Which results in one of them having you waiting until they are finished,
127 ## while the other shows you results fast - but then doesn't let less show
128 ## you how far (in %) you are in the output.
129 ## Defaults to lesspipe
130 # zstyle ':ganneff:config' lesstool lesspipe
131
132 # We have a little function "path". Call that and it displays your path
133 # variable nicely colored. Call it with argument (say, fpath) and it does
134 # it for that path. Define the colors and elements to style in this array
135 # (or live with defaults).
136 # Actually it can be used for any array, just set the pcolor style with the
137 # right matches and the color for it...
138 # zstyle ':ganneff:config' pcolor /usr green \
139 # /bin blue \
140 # /opt cyan \
141 # /sbin magenta \
142 # /local yellow \
143 # /zsh white
144
145 ## Want to see status of screen/tmux? Will list their sessions, if
146 ## any (and if they are installed)
147 # zstyle ':ganneff:config' termstatus true
148
149 ## Easy way to setup ssh agent. Usually ssh-agent (or gpg-agent) should
150 ## be setup outside zsh, like at X login time, and just serve your
151 ## terminals with their zshs inside.
152 ## But there are situations one does not have that environment around
153 ## (say, login to a remote machine) and still want an agent.
154 ##
155 ## Should we setup the agent automagically on every zsh startup?
156 ## If false then we only setup the agent/kill_agent functions to be
157 ## there.
158 ## If true we also execute the agent function and may load the keys.
159 # zstyle ':ganneff:config' doagent false
160
161 ## Which ssh keys to add to the agent? Empty if not given, then you can
162 ## manually do the ssh-add runs. Otherwise a list with path entries.
163 # zstyle ':ganneff:config' agentfiles
164
165 ## Should we kill the agent at zsh exit?
166 # zstyle ':ganneff:config' killagent true
167
168 ## Use ssh-agent or gpg-agent?
169 # zstyle ':ganneff:config' agent gpg-agent
170
171 ## zsh can do mime magic, so you can just enter a filename and
172 ## based on the mime magic, zsh will open it in the right application.
173 ## But it takes a bit to load, so if you want it, enable it.
174 ## (On my system its 1/3 of the entire zsh startup time with over 800 extra
175 ## function calls).
176 # zstyle ':ganneff:config' mimesetup false
177
178 ## List of plugins to load.
179 ## List their full path, relative to ${ZDOTDIR}/plugins here.
180 ## It doesn't matter where you get the plugins from, as long as they are
181 ## zsh files that can be sourced. As they can do everything, be careful
182 ## what you load.
183 # zstyle ':ganneff:config' plugins git-extras.plugin.zsh \
184 # history-substring-search.zsh \
185 # per-directory-history.plugin.zsh \
186 # zaw.zsh \
187 # zsh-autosuggestion.zsh
188
189 ## oh-my-zsh plugins can also be loaded, in case you like one of it.
190 ## Simply list their names here, and put their directories into
191 ## ${ZDOTDIR}/plugins/ohmy
192 #zstyle ':ganneff:config' ohmyplugins extract
193
194 ## Allow plugins to bind keys? I really dislike if plugins overwrite my
195 ## keybindings, so I always do them myself. If you prefer to let them do
196 ## it, set it to true. If set to false, you most probably want a
197 ## ${ZDOTDIR}/80_KeyBindings.zsh.local (or one of the variable
198 ## subdirectories, Keybindings.zsh) to set the keybindings.
199 # zstyle ':ganneff:config' pluginbindkeys false
200
201 ## Color to use when highlighting suggestions in the zsh-autosuggestion plugin
202 ## Uses format of `region_highlight`
203 ## More info: http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Zle-Widgets
204 #zstyle ':ganneff:config' ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE 'fg=green'
205
206 ## Want to have -i option for mv/cp, ie. interactive, prompt before
207 ## overwriting?
208 # zstyle ':ganneff:config' safemvcp false
209
210 ## If you want to point your temp directory to a tmpfs based one,
211 ## say on a systemd based system (where it ends up /run/user/$UID usually),
212 ## set this to true.
213 # zstyle ':ganneff:config' runtmp true
214
215 ## If there is already a TMPDIR variable, we use its content, no matter
216 ## what the runtmp setting says. If you want to forcefully repoint the
217 ## tmpdir variable, no matter what, true is your friend here.
218 # zstyle ':ganneff:config' resettmpdir true
219
220 ########################################################################
221 ### Prompt setup ###
222 ## use vcs_info in prompt
223 # zstyle ':prompt:ganneff' vcs_info true
224
225 ## use defaults set by me?
226 # zstyle ':prompt:ganneff' set_vcs_info_defaults true
227
228 ## if set_vcs_info_defaults is false, you may want to enable some of the
229 ## following lines or whichever combination you like of it. See the
230 ## vcs_info documentation for what they mean.
231 # zstyle ':vcs_info:*' max-exports 1
232 # zstyle ':vcs_info:*' use-prompt-escapes
233 # zstyle ':vcs_info:*' use_simple
234 # zstyle ':vcs_info:*' stagedstr "!"
235 # zstyle ':vcs_info:*' unstagedstr "?"
236 # zstyle ':vcs_info:*' check-for-changes true
237
238 ## change vcs_info formats for the prompt
239 # zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat "${PR_YELLOW}%b%{${PR_RED}%}:${PR_YELLOW}%r${PR_NO_COLOR}"
240 # zstyle ':vcs_info:*' formats "(${PR_YELLOW}%s${PR_NO_COLOR})-[${PR_GREEN}%b${PR_NO_COLOR}]%m%u%c "
241 # zstyle ':vcs_info:*' actionformats "(${PR_YELLOW}%s${PR_NO_COLOR})-[${PR_GREEN}%b${PR_NO_COLOR}-${PR_RED}(%a)${PR_NO_COLOR}]%m%u%c "
242 # zstyle ':vcs_info:*' disable cdv darcs mtn tla hg fossil p4
243
244 ## Similar to the zbell function included, this lets the prompt do it.
245 ## That way one can not forget to activate it. But as one might not want
246 ## it each and every time when a command runs a little longer, the
247 ## timeout here should be really high. I recommend something like 300 or
248 ## 600. Set it to 0 to turn this feature off entirely, default is 600
249 # zstyle ':prompt:ganneff' longbell 600
250
251 ## The following list of commands is ignored, no bell is output if it
252 ## runs too long. $EDITOR, $PAGER, man and maybe ssh might be good
253 ## candidates and as such are the default. If you put variables here,
254 ## we will additionally expand them at prompt setup time and so keep
255 ## both, the variable itself as well as the expanded command ignored.
256 # zstyle ':prompt:ganneff' bell_ignore '$EDITOR' '$PAGER' sleep man ssh zsh watch less
257
258 ## Use color in prompt.
259 ## COLORS is defined as true/false in 01_Terminfo.zsh depending on
260 ## capabilities of the terminal. If unset then defined by those.
261 # zstyle ':prompt:ganneff' colors true/false
262
263 ## If drawing lines, make them "nice looking".
264 ## LINEDRAW is defined as true/false in 01_Terminfo.zsh depending on
265 ## capabilities of the terminal. If unset then defined by those.
266 #zstyle ':prompt:ganneff' nicelines true/false
267
268 ## Populate prompt info item "battery"
269 ## If `none' then no battery function at all.
270 ## If either `ibam' or `acpi' then use those tools to gather
271 ## the current battery level.
272 # zstyle ':prompt:ganneff' battery none
273
274 ## If true (default), use a right side prompt
275 #zstyle ':prompt:ganneff:right:setup' use-rprompt true
276
277 ## Define list of items for the prompt. See prompt -h ganneff
278 ## for more information.
279 # zstyle ':prompt:ganneff:left:full:setup' items \
280 # ulcorner line openparentheses user at host colon pts closeparentheses line history \
281 # line shell-level line flexline openparentheses path closeparentheses line urcorner newline \
282 # llcorner line rc openparentheses time closeparentheses line vcs line change-root pipe space
283 # zstyle ':prompt:ganneff:right:full:setup' items \
284 # pipe line openparentheses date closeparentheses line lrcorner
285 # zstyle ':prompt:ganneff:left:small:setup' items \
286 # ulcorner line openparentheses user at host closeparentheses line openparentheses path closeparentheses newline \
287 # llcorner line rc openparentheses time closeparentheses line vcs line pipe space
288
289 ## Override the token of an item, here set the date one to also show day of year and week of year
290 #zstyle ':prompt:ganneff:*:items:date' token '%D{%Y-%m-%d [d:%j/w:%V]}'
291
292 # Example of an extra defined item.
293 # zstyle ':prompt:ganneff:extra:ganneff' pre '${PR_RED}'
294 # zstyle ':prompt:ganneff:extra:ganneff' post '${PR_NO_COLOR}'
295 # zstyle ':prompt:ganneff:extra:ganneff' token '$BLABLA'
296 # zstyle ':prompt:ganneff:extra:ganneff' precmd jj_blabla
297
298
299 ########################################################################
300 # Styles "imported" from "external" widgets #
301 # The following may not show the default values. #
302 ########################################################################
303
304 ## accept-line widget
305 ## A newly added command will may not be found or will cause false
306 ## correction attempts, if you got auto-correction set. By setting the
307 ## following style, we force accept-line() to rehash, if it cannot
308 ## find the first word on the command line in the $command[] hash.
309 # zstyle ':acceptline:*' rehash true
310
311 ## If the command line is empty, we can either ignore enter, or clear
312 ## the screen. Pick your poison, default is ignore
313 ## Ignore enter?
314 # zstyle ':acceptline:empty' call_default false
315
316 ## OR
317
318 ## Clear the screen?
319 #zstyle ':acceptline:empty' default_action clear-screen
320
321 ## Warning issued when command not found, but a completion exists.
322 # zstyle ":acceptline:*" compwarnfmt \
323 # 'The command %c will not execute, but a completion %f exists.
324 # Auto correction is set to ON, zsh will try to run the completion.
325 # This may lead to unexpected results.
326 #
327 # Hit enter again, to try execution anyway.'