-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_zshrc
46 lines (37 loc) · 1.25 KB
/
dot_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
export LC_ALL=en_AU.UTF-8
export LANG=en_AU.UTF-8
export LANGUAGE=en_AU.UTF-8
# Ensure editor is set
export EDITOR=vim
# Source personal aliases/functions
source ~/.zsh/path.zsh
source ~/.zsh/aliases.zsh
source ~/.zsh/functions.zsh
# Separate zim home (module installs, settings) for distrobox and host.
if [[ -v CONTAINER_ID ]]; then
ZIM_HOME=~/.zim/$CONTAINER_ID
else
ZIM_HOME=~/.zim
fi
# Download zimfw plugin manager if missing.
if [[ ! -e ${ZIM_HOME}/zimfw.zsh ]]; then
curl -fsSL --create-dirs -o ${ZIM_HOME}/zimfw.zsh \
https://github.com/zimfw/zimfw/releases/latest/download/zimfw.zsh
fi
# Install missing modules, and update ${ZIM_HOME}/init.zsh if missing or outdated.
if [[ ! ${ZIM_HOME}/init.zsh -nt ${ZDOTDIR:-${HOME}}/.zimrc ]]; then
source ${ZIM_HOME}/zimfw.zsh init -q
fi
export fpath=(~/.zsh/completions $fpath)
# Allows ^ to be passed to the command if there is no match for the glob pattern:
unsetopt nomatch
# Allows files to be clobbered by > without warning
setopt clobber
bindkey "$terminfo[kcuu1]" history-substring-search-up
bindkey "$terminfo[kcud1]" history-substring-search-down
# Initialize modules.
source ${ZIM_HOME}/init.zsh
eval "$(starship init zsh)"
if command -v direnv &> /dev/null; then
eval "$(direnv hook zsh)"
fi