-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.common.zshrc
123 lines (90 loc) · 2.85 KB
/
.common.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
source ~/.zprofile
# //
# GENERAL OPTIONS
# //
# don't complain if no match is found on a glob expression
setopt +o nomatch
# remove duplicated command history
setopt hist_ignore_all_dups
# allow any comment starting with a space (` `) will not be remembered in history
setopt hist_ignore_space
# use case-sensitive completion
# CASE_SENSITIVE="true"
# display red dots whilst waiting for completion
COMPLETION_WAITING_DOTS="true"
# disable bi-weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"
# disable auto-setting terminal title
# DISABLE_AUTO_TITLE="true"
# disable colors in ls.
# DISABLE_LS_COLORS="true"
# disable marking untracked files under VCS as dirty
# NOTE: This makes repository status check for large repositories much faster
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# enable command auto-correction.
# ENABLE_CORRECTION="true"
# change the command execution time stamp shown in the history command output
# NOTE: either "mm/dd/yyyy", "dd.mm.yyyy", or "yyyy-mm-dd"
# HIST_STAMPS="mm/dd/yyyy"
# use hyphen-insensitive completion
# HYPHEN_INSENSITIVE="true"
# zsh custom folder
# ZSH_CUSTOM=$ZSH/custom
# //
# THEME
# //
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="bullet-train"
BULLETTRAIN_PROMPT_CHAR="%F{red}❯%F{yellow}❯%F{green}❯%f"
BULLETTRAIN_PROMPT_ORDER=(
time
status
custom
dir
virtualenv
git
cmd_exec_time
nvm
)
# //
# // PLUGINS
# //
# path to oh-my-zsh installation
export ZSH=~/.oh-my-zsh
# direnv
plugins=(direnv)
# bind ctrl-r for history searching
plugins+=(history-search-multi-word)
zstyle ":history-search-multi-word" highlight-color "fg=yellow,bold"
# enable nvm
plugins+=(zsh-nvm)
# enable aws
plugins+=(aws)
# source oh my zsh
zstyle ':omz:alpha:lib:git' async-prompt no # disable async prompt for git due to https://github.com/ohmyzsh/ohmyzsh/issues/12328
source $ZSH/oh-my-zsh.sh
# autosuggest the rest of a command
source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh
# cd command with an interactive filter
source $ZSH_CUSTOM/plugins/enhancd/init.sh
# highlight commands whilst they are typed
source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# setup auto completion
autoload -Uz compinit
zstyle ':completion:*' menu select
fpath+=~/.zfunc
# //
# ALIAS
# //
# inject copilot cli's ??, git? & gh? alias
eval "$(github-copilot-cli alias -- "$0")"
# assume aws role with `assume <profile>`
alias assume=". awsume"
# count the number of files under the current folder
alias filecount="du -a | cut -d/ -f2 | sort | uniq -c | sort -nr"
# edit a file via the default editor
alias edit="$EDITOR"
# download a file with wget
alias download="wget --debug --continue --tries=0 --read-timeout=30 --random-wait"