1 # These names are case insensitive and underscores are ignored. For
2 # example, `allexport' is equivalent to `A__lleXP_ort'.
4 # Initialisation for new style completion.
5 if [[ "$ZSH_VERSION" == (3.1|4)* ]]; then
9 print "Advanced completion system not found; ignoring zstyle settings."
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
20 #--------------------------------------------------
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.
25 # This is a multiple move based on zsh pattern matching (like "mmv").
26 # Read ``less ${^fpath}/zmv(N)'' for more details
28 # Edit small files with the command line editor.
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.
37 # zsh: argument list too long: /bin/echo
39 # $ zargs -- =echo {1..30000}
42 # This autoloadable function checks the folders specified as arguments
44 # autoload -U checkmail
45 # Edit the command line using your usual editor.
46 # autoload -U edit-command-line
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.
60 # allow me to cd directly into a dir in $PORTS_DIR from anywhere
63 if [ "${OS}" = OpenBSD ]; then
64 cdpath=( ${PORTS_DIR} )
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.
72 # Report the status of background jobs immediately, rather than
73 # waiting until just before printing a prompt.
76 # Allow comments even in interactive shells i. e.
77 # $ uname # This command prints system informations
79 # $ setopt interactivecomments
80 # $ uname # This command prints system informations
82 setopt interactivecomments
84 # Send *not* a HUP signal to running jobs when the shell exits.
87 # Print a carriage return just before printing a prompt in the line
88 # editor. For example:
95 #--------------------------------------------------
97 #--------------------------------------------------
99 # Perform =filename access
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.
114 # Try to make the completion list smaller (occupying less lines) by
115 # printing the matches in columns with different widths.
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.
127 # if the braces aren't in either of the above forms, expands single
128 # letters and ranges of letters, i. e.:
130 # $ 1a2 1b2 1w2 1x2 1y2 1z2
133 # Make the echo builtin compatible with the BSD man page echo(1)
135 # $ echo "foo\bar\baz"
138 # $ echo "foo\bar\baz"
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).
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.
152 # Make cd push the old directory onto the directory stack.
155 # change to directory without "cd"
158 # Exchanges the meanings of `+' and `-' when used with a number to
159 # specify a directory in the stack.
162 # If set, parameter expansion, command substitution and arithmetic
163 # expansion are performed in prompts.
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
173 # Do query the user before executing 'rm *' or 'rm path/*'
175 # zsh: sure you want to delete all the files in /home/dope/foo [yn]?
176 setopt normstarsilent
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
188 # Beep when an attempt is made to access a history entry which
192 # When writing out the history file, older commands that duplicate newer ones
194 setopt HISTSAVENODUPS
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
199 setopt HISTFINDNODUPS
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
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
215 # Do not enter command lines into the history list
216 # if they are duplicates of the previous event.
217 setopt hist_ignore_dups
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
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
229 # Remove superfluous blanks from each command line
230 # being added to the history list.
231 setopt hist_reduce_blanks
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.
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
244 # Remove the history (fc -l) command from the history list
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
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
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
261 # When listing files that are possible completions, show the
262 # type of each file with a trailing identifying mark.
265 # Do not require a leading '.' in a filename to be matched explicitly.
268 # Try to correct the spelling of all arguments in a line.
271 # List jobs in the long format by default.
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)).
279 # Don't push multiple copies of the same directory onto the directory
281 setopt pushdignoredups
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).
291 # Try to correct the spelling of all arguments in a line.
292 # No .. not really .. it's make me crazy *g*
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>'.
300 # : 1054961691:0;/usr/games/fortune -f
301 setopt EXTENDEDHISTORY
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''
307 # Do *not* run all background jobs at a lower priority
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