initial checkin
[zsh-lovers.git] / zsh_people / strcat / zshoptions
1 # These names are case insensitive and underscores are ignored. For
2 # example, `allexport' is equivalent to `A__lleXP_ort'.
3
4 # Initialisation for new style completion.
5 if [[ "$ZSH_VERSION" == (3.1|4)* ]]; then
6         autoload -U compinit
7         compinit -C
8 else
9         print "Advanced completion system not found; ignoring zstyle settings."
10         function zstyle { }
11 fi
12
13 #--------------------------------------------------
14 # if [[ "$ZSH_VERSION" == 4.2.<0->* ]]; then
15 #       # If you now paste a url it will be magically quoted!
16 #       # But it only works on 4.2.0 and later.
17 #       autoload -U url-quote-magic
18 #       zle -N self-insert url-quote-magic
19 # fi
20 #-------------------------------------------------- 
21
22 # This tries to find wordcode files and automatically re-compile them if
23 # at least one of the original files is newer than the wordcode file.
24   autoload zrecompile
25 # This is a multiple move based on zsh pattern matching (like "mmv").
26 # Read ``less ${^fpath}/zmv(N)'' for more details
27   autoload zmv
28 # Edit small files with the command line editor.
29   autoload -U zed
30 # Like xargs, but instead of reading lines of arguments from standard input,
31 # it takes them from the command line. This is possible/useful because,
32 # especially with recursive glob operators, zsh often can construct a command
33 # line for a shell function that is longer than can be accepted by an external
34 # command. This is what's often referred to as the "shitty Linux exec limit" ;)
35 # The limitation is on the number of characters or arguments.
36 #  $ =echo {1..30000}
37 #  zsh: argument list too long: /bin/echo
38 #  $ autoload -U zargs
39 #  $ zargs -- =echo {1..30000}
40 #  [ long list ;) ]
41    autoload -U zargs
42 # This autoloadable function checks the folders specified as arguments
43 # for new mails.
44 #  autoload -U checkmail
45 # Edit the command line using your usual editor.
46 #  autoload -U edit-command-line
47
48 # This module should be automatically loaded if u use menu selection but
49 # to be sure we do it here
50   zmodload -i zsh/complist
51 # Autoload zsh modules when they are referenced
52 # A builtin command interface to the stat system call
53   zmodload -a zsh/stat stat
54 # A builtin that can clone a running shell onto another terminal.
55   zmodload -e zsh/clone
56
57 # Watch for logins
58 watch=(notme)
59
60 # allow me to cd directly into a dir in $PORTS_DIR from anywhere
61 #  $ cd shells && pwd
62 #  /usr/ports/shells
63 if [ "${OS}" = OpenBSD ]; then
64         cdpath=( ${PORTS_DIR} )
65 fi
66
67 # When listing options (by `setopt', `unsetopt', `set -o' or `set +o'),
68 # those turned on by default appear in the list prefixed with `no'.
69 # Hence (unless KSH_OPTION_PRINT is set), `setopt' shows all options
70 # whose settings are changed from the default.
71 #
72 # Report the status of background jobs immediately, rather than
73 # waiting until just before printing a prompt.
74 setopt notify 
75
76 # Allow comments even in interactive shells i. e.
77 # $ uname # This command prints system informations
78 # zsh: bad pattern: #
79 # $ setopt interactivecomments
80 # $ uname # This command prints system informations
81 # OpenBSD
82 setopt interactivecomments
83
84 # Send *not* a HUP signal to running jobs when the shell exits.
85 setopt nohup
86
87 # Print a carriage return just before printing a prompt in the line
88 # editor. For example:
89 #  $ echo foo
90 #  foo
91 #  $ echo -n foo
92 #  $ setopt nopromptcr
93 #  $ echo -n foo
94 #  foo$
95 #--------------------------------------------------
96 # setopt nopromptcr
97 #-------------------------------------------------- 
98
99 # Perform =filename access
100 #  $ setopt EQUALS
101 #  $ echo =ls
102 #  /bin/ls
103 #  $ unsetopt EQUALS
104 #  $ echo =ls 
105 #  =ls
106 setopt equals
107
108 # Beep on an ambiguous completion.  More accurately, this forces the
109 # completion widgets to return status 1 on an ambiguous completion, which
110 # causes the shell to beep if the option BEEP is also set; this may
111 # be modified if completion is called from a user-defined widget.
112 setopt nolistbeep
113
114 # Try to make the completion list smaller (occupying less lines) by
115 # printing the matches in columns with different widths.
116 setopt list_packed
117
118 # Do not exit on end-of-file.  Require the use of exit or logout instead.
119 # However, ten consecutive EOFs will cause the shell to exit anyway, to
120 # avoid the shell hanging if its tty goes away. Also, if this option is
121 # set and the Zsh Line Editor is used, widgets implemented by shell
122 # functions can be bound to EOF (normally Control-D) without printing
123 # the normal warning message.  This works only for normal widgets, not
124 # for completion widgets.
125 #setopt ignore_eof
126
127 # if the braces aren't in either of the above forms, expands single
128 # letters and ranges of letters, i. e.:
129 #  $ print 1{abw-z}2
130 #  $ 1a2 1b2 1w2 1x2 1y2 1z2
131 setopt braceccl
132
133 # Make the echo builtin compatible with the BSD man page echo(1)
134 # command.
135 #  $ echo "foo\bar\baz"
136 #  foaaz
137 #  $ unsetopt bsdecho
138 #  $ echo "foo\bar\baz"
139 #  foo\bar\baz
140 unsetopt bsdecho
141
142 # If the argument to a cd command (or an implied cd with the
143 # AUTO_CD option set) is not a directory, and does not begin with a
144 # slash, try to expand the expression as if it were preceded by a
145 # '~' (see section Filename Expansion).
146 setopt cdablevars
147
148 # Report the status of background and suspended jobs before exiting a shell
149 # with job control; a second attempt to exit the shell will succeed.
150 setopt checkjobs
151
152 # Make cd push the old directory onto the directory stack. 
153 setopt autopushd 
154
155 # change to directory without "cd"
156 setopt autocd
157
158 # Exchanges the meanings of `+' and `-' when used with a number to 
159 # specify a directory in the stack.      
160 setopt pushdminus
161
162 # If set, parameter expansion, command substitution and arithmetic 
163 # expansion are performed in prompts.   
164 setopt pushdsilent
165
166 # Treat the '#', '~' and '^' characters as part of patterns 
167 # for filename generation, etc. (An initial unquoted '~'
168 # always produces named directory expansion.)
169 # | $ grep word *~(*.gz|*.bz|*.bz2|*.zip|*.Z)
170 # searches for word not in compressed files
171 setopt extendedglob 
172
173 # Do query the user before executing 'rm *' or 'rm path/*'
174 # $ rm -rf *
175 # zsh: sure you want to delete all the files in /home/dope/foo [yn]?
176 setopt normstarsilent 
177
178 # If querying the user before executing `rm *' or `rm path/*',
179 # first wait ten seconds and ignore anything typed in that time.
180 # This avoids the problem of reflexively answering `yes' to the query
181 # when one didn't really mean it. The wait and query can always be
182 # avoided by expanding the `*' in ZLE (with tab).
183 setopt no_rm_star_wait
184
185 # Shut up ;)
186 setopt nobeep 
187
188 # Beep when an attempt is made to access a history entry which
189 # isn't there.
190 setopt histbeep
191
192 # When writing out the history file, older commands that duplicate newer ones
193 # are omitted.
194 setopt HISTSAVENODUPS
195
196 # When searching for history entries in the line editor, do not display
197 # duplicates of a line previously found, even if the duplicates are not
198 # contiguous.                       
199 setopt HISTFINDNODUPS
200
201 # If the internal history needs to be trimmed to add the current command line,
202 # setting this option will cause the oldest history event that has a duplicate
203 # to be lost before losing a unique event from the list.
204 # You should be sure to set the value of HISTSIZE to a larger number
205 # than SAVEHIST in order to give you some room for the duplicated
206 # events, otherwise this option will behave just like HIST_IGNORE_ALL_DUPS
207 # once the history fills up with unique events.
208 setopt hist_expire_dups_first
209
210 # If a new command line being added to the history list duplicates an
211 # older one, the older command is removed from the list (even if it is
212 # not the previous event).
213 setopt hist_ignore_all_dups
214
215 # Do not enter command lines into the history list
216 # if they are duplicates of the previous event.
217 setopt hist_ignore_dups
218
219 # Remove command lines from the history list when the first character on
220 # the line is a space, or when one of the expanded aliases contains a
221 # leading space.
222 # Note that the command lingers in the internal history until the next
223 # command is entered before it vanishes, allowing you to briefly reuse
224 # or edit the line.  If you want to make it vanish right away without
225 # entering another command, type a space and press return.
226 setopt hist_ignore_space
227
228 # HIST_REDUCE_BLANKS
229 # Remove superfluous blanks from each command line
230 # being added to the history list.
231 setopt hist_reduce_blanks
232
233 # Whenever the user enters a line with history expansion,
234 # don't execute the line directly; instead, perform
235 # history expansion and reload the line into the editing buffer.
236 setopt hist_verify
237
238 # Remove function definitions from the history list.
239 # Note that the function lingers in the internal history until the next
240 # command is entered before it vanishes, allowing you to briefly reuse
241 # or edit the definition.
242 #setopt hist_no_functions
243
244 # Remove the history (fc -l) command from the history list
245 # when invoked.
246 # Note that the command lingers in the internal history until the next
247 # command is entered before it vanishes, allowing you to briefly reuse
248 # or edit the line.
249 setopt hist_no_store
250
251 # If this is set, zsh sessions will append their history list to
252 # the history file, rather than overwrite it. Thus, multiple parallel
253 # zsh sessions will all have their history lists added to the
254 # history file, in the order they are killed
255 setopt appendhistory
256
257 # If unset, the cursor is set to the end of the word if completion is
258 # started. Otherwise it stays there and completion is done from both ends.
259 setopt completeinword 
260
261 #  When listing files that are possible completions, show the
262 # type of each file with a trailing identifying mark.
263 setopt list_types
264
265 #  Do not require a leading '.' in a filename to be matched explicitly.
266 setopt globdots
267
268 # Try to correct the spelling of all arguments in a line.
269 setopt correctall
270
271 # List jobs in the long format by default.
272 setopt longlistjobs 
273
274 # Print eight bit characters literally in completion lists, etc.
275 # This option is not necessary if your system correctly returns the
276 # printability of eight bit characters (see man page ctype(3)).
277 setopt printeightbit
278
279 # Don't push multiple copies of the same directory onto the directory
280 # stack
281 setopt pushdignoredups 
282
283 # This option both imports new commands from the history file, and also
284 # causes your typed commands to be appended to the history file (the
285 # latter is like specifying INC_APPEND_HISTORY).
286 # The history lines are also output with timestamps ala
287 # EXTENDED_HISTORY (which makes it easier to find the spot where
288 # we left off reading the file after it gets re-written).
289 setopt sharehistory 
290
291 # Try to correct the spelling of all arguments in a line.
292 # No .. not really .. it's make me crazy *g*
293 # setopt correctall
294
295 # Save each command's beginning timestamp (in seconds since the epoch)
296 # and the duration (in seconds) to the history file.  The format of
297 # this prefixed data is:
298 # ':<beginning time>:<elapsed seconds>;<command>'.
299 # i. e.:
300 #  : 1054961691:0;/usr/games/fortune -f
301 setopt EXTENDEDHISTORY
302
303 # Allow the short forms of for, select, if, and function constructs, i.
304 # e.: ``for i (*.o) rm $i'' instead of ``for i in *.o; do rm $i; done''
305 setopt shortloops
306
307 # Do *not* run all background jobs at a lower priority
308   unsetopt bgnice 
309 # If this option is unset, output flow control via start/stop characters
310 # (usually assigned to ^S/^Q) disabled in the shell's editor.
311   unsetopt flow_control