-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
67 lines (58 loc) · 1.43 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#===================#
# Zsh configuration #
#===================#
# For the option meanings, refer to zshoptions(1)
setopt SHARE_HISTORY
setopt HIST_IGNORE_ALL_DUPS
setopt AUTO_CD
#===========#
# fzf setup #
#===========#
# Set up fzf key bindings and fuzzy completion
export FZF_CTRL_T_COMMAND=""
export FZF_ALT_C_COMMAND=""
source <(fzf --zsh)
# Disable the beep when exiting fzf search
unsetopt beep
#
# usage note of fzf
#
# * Press CTRL-r to fuzzy find throught shell history. The selected command will
# be pasted onto the command-line.
#
#=====================#
# zsh-autosuggestions #
#=====================#
# Enable zsh-autosuggestions
if [ $(uname -s) = 'Darwin' ]
then
source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh
else
source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
fi
# keybinding to accept the next part of the suggestion
bindkey '^ ' forward-word
# suggestion text color
export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#6e6f72"
#
# usage note of zsh-autosuggestions
#
# Press → to accept the entire suggestion, and press CTRL-space to accept the
# next part of the suggestion.
#
#====================#
# other applications #
#====================#
# Init Starship
eval "$(starship init zsh)"
#=========#
# aliases #
#=========#
alias amend='git commit --amend --no-edit'
alias log='git log --oneline'
if [ $(uname -s) = 'Darwin' ]
then
alias ls='ls -G'
else
alias ls='ls --color=auto'
fi