forked from ai/environment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzshrc
77 lines (62 loc) · 1.45 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
68
69
70
71
72
73
74
75
76
77
# History
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
# Colors
autoload -U colors && colors
# Key bindings
bindkey -e
bindkey ';5D' backward-word # ctrl+left
bindkey ';5C' forward-word # ctrl+right
# Zsh plugins
if [ -f ~/.antigen.zsh ]; then
ANTIGEN_MUTEX=false
source ~/.antigen.zsh
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-history-substring-search
antigen theme denysdovhan/spaceship-prompt
antigen bundle zsh-users/zsh-completions
antigen apply
fi
# Completion
zstyle :compinstall filename '/home/ai/.zshrc'
autoload -Uz compinit
compinit
# Prompt
SPACESHIP_PROMPT_ORDER=(time user dir host git exit_code line_sep char)
# Fast way to Dev projects
if [ -d ~/Dev ]; then
cdpath=(. ~/Dev)
fi
# Dev tools
if [ -d ~/.asdf/ ]; then
source $HOME/.asdf/asdf.sh
autoload -U +X bashcompinit && bashcompinit
source $HOME/.asdf/completions/asdf.bash
fi
# Rip Grep
export RIPGREP_CONFIG_PATH=~/.ripgreprc
# Console editor
export EDITOR=micro
# VS Code
export ELECTRON_TRASH=gio
alias e='code .'
# Aliases
alias g='git'
alias ..='cd ..'
alias l='exa --all'
alias ll='exa --long --all --git'
alias cat='bat'
# Node.js
alias n='pnpm '
alias pui='pnpm update --interactive --latest'
alias pu='pnpm update'
alias p='n clean-publish'
# pnpm
if [ -f ~/.config/tabtab/zsh/pnpm.zsh ]; then
source ~/.config/tabtab/zsh/pnpm.zsh
fi
# Python
export PATH=~/.local/bin/:$PATH
# Fix mpv
export MESA_LOADER_DRIVER_OVERRIDE=i965