-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
42 lines (35 loc) · 851 Bytes
/
.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
# Prompt
# Keep it simple when Emacs is connecting
if [[ "$TERM" == "dumb" ]]
then
unsetopt zle
unsetopt prompt_cr
unsetopt prompt_subst
if whence -w precmd >/dev/null; then
unfunction precmd
fi
if whence -w preexec >/dev/null; then
unfunction preexec
fi
PS1='$ '
return
fi
# Interactive prompt
autoload -Uz vcs_info
precmd_functions+=( vcs_info )
setopt prompt_subst
zstyle ':vcs_info:git:*' check-for-changes true
zstyle ':vcs_info:*' unstagedstr '*'
zstyle ':vcs_info:*' stagedstr '+'
zstyle ':vcs_info:git:*' formats '%F{200}[%b%u%c]%f'
zstyle ':vcs_info:*' enable git
ZSH_THEME="powerlevel10k/powerlevel10k"
source ~/.aliases
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
killport() {
if [ -z "$1" ]; then
echo "Usage: killport <port-number>"
return 1
fi
kill -9 $(lsof -i4:$1 -t)
}