blob: 4d4b5079d3ae676ab0bb19d4e174d2df44aa94fe (
plain)
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
|
# Venomade's zshrc
# source global variables and aliases
[ -f "$HOME/.config/shell/alias" ] && source "$HOME/.config/shell/alias"
[ -f "$HOME/.config/shell/vars" ] && source "$HOME/.config/shell/vars"
[ -f "$HOME/.config/shell/functions" ] && source "$HOME/.config/shell/functions"
# load modules
zmodload zsh/complist
autoload -U compinit && compinit
autoload -U colors && colors
# completion
zstyle ':completion:*' menu select
zstyle ':completion:*' special-dirs true
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} ma=0\;33
# options
setopt append_history inc_append_history share_history
setopt auto_menu menu_complete
setopt auto_param_slash
setopt no_case_glob no_case_match
setopt globdots
setopt extended_glob
setopt share_history
# history
export HISTFILE=~/.zsh_history
export HISTSIZE=10000
export SAVEHIST=10000
# termtitle
shorten_path() {
local path="${PWD/#$HOME/~}"
local parts=("${(@s:/:)path}")
if (( ${#parts} > 3 )); then
echo "${parts[1]}/.../${parts[-2]}/${parts[-1]}"
else
echo "$path"
fi
}
autoload -Uz add-zsh-hook
precmd() {
print -Pn "\e]0;$(shorten_path)\a"
}
export STARSHIP_CONFIG=~/.config/starship/config.toml
eval "$(starship init zsh)"
# source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
bindkey -e
|