]> git.netwichtig.de Git - user/henk/vcsh/zsh.git/blob - .zshrc
fix: 'source' does not take multiple files as arguments
[user/henk/vcsh/zsh.git] / .zshrc
1 # zprof only makes sense at the very top
2 # zmodload zsh/zprof
3
4
5 # exports are usually independent and standalone
6 # so they can stay at the top
7
8 # where to write history
9 export HISTFILE=~/.zsh_history
10 export HISTSIZE=1000000000
11 export SAVEHIST=1000000000
12
13 export ANSIBLE_NOCOWS=1
14 export ANSIBLE_STRATEGY=mitogen_linear
15
16 # what is that for exactly? maybe taskwarrior? or timewarrior?
17 REPORTTIME=10
18
19 ## define word characters (for stuff like backward-word, forward-word, backward-kill-word,..)
20 ## these are NOT separators but chars considered part of a word
21 #WORDCHARS='*?_-.[]~=/&;!#$%^(){}<>' # the default
22
23 # zsh you-should-use
24 export YSU_MODE=ALL
25
26 # I want sbin executables available
27 export PATH=${PATH}:/usr/local/sbin:/sbin:/usr/sbin
28 export PATH=${PATH}:~/bin
29
30 # colors for newt/whiptail (for debconf, needrestart, etc.)
31 # works better with selenized colorscheme
32 export NEWT_COLORS='checkbox=yellow,;roottext=yellow,'
33
34 # where zsh looks for functions
35 fpath=(~/.zsh_functions $fpath)
36
37
38 # hashed directories are usually independent and standalone
39 # so they can stay at the top
40 hash -d diary=~/Data/henksfiles/workinprogress/Dokumente/diary
41 hash -d lifedocs=~/Data/henksfiles/workinprogress/Dokumente/Leben
42 hash -d bewerbung=~/Data/personal/henk/workinprogress/Dokumente/Arbeit/bewerbung
43 hash -d rezepte=~/Data/henksfiles/workinprogress/Dokumente/rezepte/cuisine
44 hash -d templates=~/Data/henksfiles/workinprogress/templates
45 hash -d gitignore=~/Data/public/software/gitignore
46 hash -d doc=/usr/share/doc
47 hash -d TODO=~/Data/henksfiles/TODO/
48 hash -d fortunes=~/Data/henksfiles/workinprogress/Dokumente/fortunes/
49
50
51 # aliases are usually independent and standalone
52 source ~/.zsh_aliases
53 # TODO break this up or make functions or get rid?
54 source ~/.zsh_qemu
55
56
57 # load plugin manager after all 'static' stuff is done
58 # source ~/Data/public/software/zinit/zinit.zsh
59 source "${HOME}/.zgenom/zgenom.zsh"
60 # Check for plugin and zgenom updates every 7 days
61 # This does not increase the startup time.
62 zgenom autoupdate
63
64
65 # mostly static stuff, env vars
66 # zinit load 'https://github.com/joel-porquet/zsh-dircolors-solarized'
67 # zinit load "https://github.com/greymd/tmux-xpanes"
68 zgenom load 'https://github.com/joel-porquet/zsh-dircolors-solarized'
69 zgenom load "https://github.com/greymd/tmux-xpanes"
70
71
72 # options are usually independent and standalone
73 # so they can stay at the top
74 setopt AUTO_CD
75 setopt CHASE_LINKS
76
77 setopt AUTO_NAME_DIRS
78
79 setopt BRACE_CCL
80 setopt EXTENDED_GLOB
81 setopt MARK_DIRS
82 setopt NUMERIC_GLOB_SORT
83 setopt RC_EXPAND_PARAM
84 #setopt WARN_CREATE_GLOBAL
85 setopt GLOB_DOTS
86
87 # remove previous entries from history
88 setopt HIST_IGNORE_ALL_DUPS
89 # do not write lines starting with a space to history file
90 setopt HIST_IGNORE_SPACE
91 # Remove superfluous blanks
92 setopt HIST_REDUCE_BLANKS
93 # expand history expansion for verification
94 setopt HIST_VERIFY
95 # save timestamp and runtime as well
96 setopt EXTENDED_HISTORY
97 # write line to history file when finished, not when started, to have correct runtime
98 setopt INC_APPEND_HISTORY_TIME
99
100 setopt NO_CLOBBER
101 setopt CORRECT
102 setopt CORRECT_ALL
103 #unsetopt NOMATCH
104 setopt PRINT_EXIT_VALUE
105
106 setopt AUTO_CONTINUE
107 setopt NO_BG_NICE
108 # display PID when suspending processes as well
109 setopt LONG_LIST_JOBS
110 # Report the status of background jobs immediately, rather than waiting until just before printing a prompt.
111 setopt NOTIFY
112 # Whenever  a  command completion or spelling correction is attempted, make sure the entire command path is hashed first.  This makes the first completion slower but avoids false reports of spelling errors.
113 setopt HASH_LIST_ALL
114 # If unset, the cursor is set to the end of the word if completion is started. Otherwise it stays there and completion is done from both ends.
115 setopt COMPLETE_IN_WORD
116 # use zsh field splitting
117 setopt NO_SH_WORD_SPLIT
118 # unset parameters should cause an error
119 # CONFLICTS WITH ZINIT
120 # CONFLICTS WITH ZGENOM
121 # setopt NO_UNSET
122
123
124 # load before completion system initialization
125 # zinit load 'https://github.com/zsh-users/zsh-completions'
126 zgenom load 'https://github.com/zsh-users/zsh-completions'
127
128 # initialize completion system before loading plugins and external configs
129 source ~/.zsh_comprc
130
131
132 # TODO reconsider this
133 # source /usr/share/autojump/autojump.sh
134
135
136 # autoload all functions defined by me
137 # since only filenames are required we
138 # * follow symlinks
139 # * work only on plainfiles
140 # * take only the filename part without dir
141 autoload ~/.zsh_functions/[^_]*(-.:t)
142
143
144 autoload -Uz vcs_info
145 autoload -Uz zcalc
146 autoload -Uz zargs
147
148
149 # spawn editor on current command line
150 autoload -Uz edit-command-line
151 zle -N edit-command-line
152 bindkey -M vicmd '^X^E' edit-command-line
153 bindkey -M viins '^X^E' edit-command-line
154
155
156 #this mainly sets vars, binds keys, does zle stuff
157 # zinit load 'https://github.com/laurenkt/zsh-vimto'
158 zgenom load 'https://github.com/laurenkt/zsh-vimto'
159
160 # functions and an autoload, should be fine here
161 # zinit load 'https://github.com/MichaelAquilina/zsh-you-should-use'
162 zgenom load 'https://github.com/MichaelAquilina/zsh-you-should-use'
163
164
165 # source ~/.zsh_taskwarrior
166 # source ~/.zsh_functions
167 # source ~/.zsh_functions_media
168 # source ~/.zsh_functions_taskwarrior
169
170
171 # TODO break this up
172 source ~/.zsh_local
173
174 # TODO break this up
175 for f in ~/.env_*(N)
176 do
177         source $f
178 done
179
180
181 typeset -U path
182
183 #zle -N zle-line-init
184 #zle -N zle-keymap-select
185
186
187 # keybindings might have been changed by plugins, etc.
188 # so they go more to the bottom
189
190
191 # should probably be closer to the bottom than the top?
192 # zinit load 'https://github.com/nojhan/liquidprompt'
193 zgenom load 'https://github.com/nojhan/liquidprompt'
194
195
196 # needs to be loaded close to the end because it hooks into other stuff
197 # see https://github.com/zsh-users/zsh-syntax-highlighting
198 source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
199
200
201 # commands to run after initialization is complete
202 #task awaiting
203 cat ~/.motd
204 # zprof