-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzsh-shell.sh
More file actions
42 lines (34 loc) · 799 Bytes
/
zsh-shell.sh
File metadata and controls
42 lines (34 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env zsh
# `autocd` allows you to cd by just typing in a directory name
#
# NB: I don't like this any-more because:
#
# $ pwd
# /path/to
# $ mkdir somewhere
# $ alias go=somewhere
# $ go
# $ pwd
# /path/to/somewhere
#
setopt noautocd
# warn me if a glob doesn't match anything
setopt nomatch
# globbing is case insensitive
setopt no_case_glob
# commands preceded with '#' aren't run
setopt interactive_comments
# ignore any commands beginning with a space
setopt hist_ignore_space
# load zmv - the pattern renamer/mover/copier in zsh
autoload -Uz zmv
# no help in zsh
function help() {
if [ "$#" -eq 0 ]; then
echo "Usage: help <command>"
return 1
fi
bash -c "help $(printf ' %q' "$@")"
}
# highlight usefully
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets)