-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
85 lines (63 loc) · 3.7 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
78
79
80
81
82
83
84
85
# ================ Config ==================================
bindkey -e # Use emacs movement bindings
bindkey "^[[1;3C" forward-word # Option Forward Arrow
bindkey "^[[1;3D" backward-word # Option Back Arrow
setopt globdots # match files starting with .
export PATH=$HOME/.dotfiles/bin:$PATH # Adds my binaries
source ~/.config/base16-shell/scripts/base16-gruvbox-dark-medium.sh
# ================ Homebrew ================================
eval "$(starship init zsh)" # Cross-Shell Prompt
eval "$(zoxide init zsh)" # A smarter cd command
source ~/.fzf.zsh # Command-line fuzzy finder
source /usr/local/share/antigen/antigen.zsh # Plugin manager for zsh
# https://docs.brew.sh/Shell-Completion
fpath=(/usr/local/share/zsh/site-functions $fpath)
autoload -Uz compinit && compinit
# ================ Antigen =================================
export ADOTDIR=~/.antigen # Explict default value for Topgrade
antigen bundle zsh-users/zsh-autosuggestions # Autosuggestions
antigen bundle gezalore/zsh-prioritize-cwd-history # Prioritize history based on current dir
antigen bundle MichaelAquilina/zsh-history-filter # Exclude commands from history based on patterns
antigen bundle Aloxaf/fzf-tab # Fuzzy tab completion
antigen apply
bindkey '^[[Z' autosuggest-accept # shift-tab to accept autosuggestion
bindkey '\t' fzf-tab-complete # tab to complete
# ================ History =================================
export HISTFILE=~/.zsh_history # Set history file location
export HISTSIZE=10000 # More history in memory
export SAVEHIST=10000 # More history on disk
export HISTORY_FILTER_EXCLUDE=("http://" "https://") # Ignore commands with urls
setopt INC_APPEND_HISTORY # Append history incrementally
setopt HIST_IGNORE_ALL_DUPS # Ignore all duplicates
# ================ asdf ====================================
source /usr/local/opt/asdf/libexec/asdf.sh # Manage multiple runtime versions
# setup asdf for node
export ASDF_NODEJS_LEGACY_FILE_DYNAMIC_STRATEGY=latest_available
# ================ Hub =====================================
# Delete Git's official completions to allow Zsh's official Git completions to work.
# This is also necessary for hub's Zsh completions to work:
# https://github.com/github/hub/issues/1956
[ -f /usr/local/share/zsh/site-functions/_git ] && rm /usr/local/share/zsh/site-functions/_git
# ================ Aliases =================================
alias podget='noglob yt-dlp --restrict-filenames \
--extract-audio --audio-format "mp3" --audio-quality "9" \
--add-metadata --output "/Users/bdarfler/Dropbox/Podcast/%(title)s.%(ext)s" "$@"'
alias kget='cp -i /Volumes/Kindle/documents/My\ Clippings.txt \
/Users/bdarfler/Dropbox/0\ Inbox/My\ Clippings\ `date +%m-%d`.md && \
osascript -e "tell application \"Finder\" to eject \"Kindle\"" &&\
open /Users/bdarfler/Dropbox/0\ Inbox/My\ Clippings\ `date +%m-%d`.md'
# ================ Better Versions =========================
alias git='hub'
alias cat='bat'
alias less='bat'
alias diff='delta'
alias find='fdfind'
alias top='htop'
alias ps='procs'
alias ls='exa'
alias grep='rg'
alias ping='prettyping --nolegend'
alias df='duf'
alias du='dust'
# ================ Local .zshrc ============================
[ -f ~/.zshrc.local ] && source ~/.zshrc.local