-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
45 lines (36 loc) · 1.17 KB
/
.zshrc
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
43
44
45
# This is intended as an extension to the shell-agnostic my.sh
export PS1=" %{%F{red}%B%}%n%{%f%b%} | " # " max | "
export RPROMPT="%F{green}%~%f"
bindkey '^[[1;5C' forward-word
bindkey '^[[1;5D' backward-word
bindkey '^W' kill-region
bindkey '^[[3;5~' kill-word
# fg binding - runs a widget that runs fg
fg_widget() fg
zle -N fg_widget
bindkey '^Z' fg_widget
# Make pretty colors
export TERM=xterm-256color
# if [[ ! -o login ]] ; then
# export TERM=xterm-256color
# else
# export TERM=xterm # This makes control+arrows work better
# fi
# Make fg not clog up the history
setopt hist_ignore_space
# We also added a space in front of fg in .alias
# If we run out of space, remove duplicates first
setopt hist_expire_dups_first
# When searching history, skip duplicates. Unfortunately, doesn't apply
# to "up"ing through history, only searching.
setopt hist_find_no_dups
# For that, we have to modify what we save. Don't save a command if it
# is a duplicate of the previous one
setopt hist_ignore_dups
# List after changing directories
# https://stackoverflow.com/a/3964198
function list_dir() {
emulate -L zsh
ls
}
# chpwd_functions=(${chpwd_functions[@]} "list_dir")