summaryrefslogtreecommitdiff
path: root/zsh/.zshrc
blob: 9eaf1bbd6ffe8d6027398e847c29b6ddf1905e9b (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
# now use Starship instead of oh-my-zsh theme
export ZSH="/home/dcariotti/.oh-my-zsh"
plugins=(git)

source $ZSH/oh-my-zsh.sh

[[ $TERM != "screen" ]] && exec tmux
eval "$(starship init zsh)"

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

export PATH=$PATH:/usr/local/go/bin

[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

export WORKON_HOME=$HOME/.virtualenvs
source /usr/share/virtualenvwrapper/virtualenvwrapper.sh

eval "$(direnv hook zsh)"
# Install Ruby Gems to ~/gems
export GEM_HOME="$HOME/.gems"
export PATH="$HOME/.gem/ruby/2.7.0/bin:$PATH"
alias mutt=neomutt
export TERM=xterm-256color

rga() {
    RG_PREFIX="rg --files-with-matches"
    local file

    file="$(
        FZF_DEFAULT_COMMAND="$RG_PREFIX '$*'" \
            fzf --sort --preview="[[ ! -z {} ]] && rg --pretty --context 5 {q}" \
                --phony -q "$*"  \
                --bind "change:reload:$RG_PREFIX {q}" \
                --preview-window="70%:wrap"
    )" &&
    xdg-open "$file"
}