/
zshrc.sh
40 lines (29 loc) · 929 Bytes
/
zshrc.sh
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
# History file
export HISTFILE=~/.zsh_history
# Don't show duplicate history entires
setopt hist_find_no_dups
# Remove unnecessary blanks from history
setopt hist_reduce_blanks
# Share history between instances
setopt share_history
# Don't hang up background jobs
setopt no_hup
# autocorrect command and parameter spelling
setopt correct
setopt correctall
# fix backspace on Debian
[ -n "$LINUX" ] && bindkey "^?" backward-delete-char
# alternate mappings for Ctrl-U/V to search the history
bindkey "^u" history-beginning-search-backward
bindkey "^v" history-beginning-search-forward
# enable autosuggestions
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
plugins=($plugins zsh-autosuggestions)
# Easier navigation: .., ..., ...., ....., ~ and -
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias -- -="cd -"
# Helpers for development
alias t="bin/rails test"