-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathexports
70 lines (54 loc) · 2.74 KB
/
exports
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
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
# http://unix.stackexchange.com/questions/2897/clicolor-and-ls-colors-in-bash
export CLICOLOR=1
export LSCOLORS="ExGxBxDxCxEgEdxbxgxcxd"
# change this to vim or emacs, if you don't want to use nano
export EDITOR="nano"
# Don't generate .pyc files
export PYTHONDONTWRITEBYTECODE=1
# For starting emacs server
export ALTERNATE_EDITOR=""
# Disable brew auto updates
export HOMEBREW_NO_AUTO_UPDATE=1
# Ripgrep config
export RIPGREP_CONFIG_PATH="${HOME}/dotfiles/ripgrep"
BREW_PREFIX=`brew --prefix`
if [[ -d "${BREW_PREFIX}" ]]; then
# Add brew path for coreutils
[ -d "${BREW_PREFIX}/opt/coreutils/libexec/gnubin" ] && PATH="${BREW_PREFIX}/opt/coreutils/libexec/gnubin:$PATH"
[ -d "${BREW_PREFIX}/opt/findutils/libexec/gnubin" ] && PATH="${BREW_PREFIX}/opt/findutils/libexec/gnubin:$PATH"
[ -d "${BREW_PREFIX}/opt/gnu-sed/libexec/gnubin" ] && PATH="${BREW_PREFIX}/opt/gnu-sed/libexec/gnubin:$PATH"
[ -d "${BREW_PREFIX}/opt/python/libexec/gnubin" ] && PATH="${BREW_PREFIX}/opt/python/libexec/gnubin:$PATH"
[ -d "${BREW_PREFIX}/opt/gnu-tar/libexec/gnubin" ] && PATH="${BREW_PREFIX}/opt/gnu-tar/libexec/gnubin:$PATH"
[ -d "${BREW_PREFIX}/opt/grep/libexec/gnubin" ] && PATH="${BREW_PREFIX}/opt/grep/libexec/gnubin:$PATH"
[ -d "${BREW_PREFIX}/opt/curl/bin" ] && PATH="${BREW_PREFIX}/opt/curl/bin:$PATH"
[ -d "${BREW_PREFIX}/opt/python/libexec/bin" ] && PATH="${BREW_PREFIX}/opt/python/libexec/bin:$PATH"
export PATH="$PATH"
fi
# Virtual environment
if [[ -f /usr/local/bin/virtualenvwrapper.sh ]]
then
export WORKON_HOME=~/.venvs
source /usr/local/bin/virtualenvwrapper.sh
fi
# Getting bash completions working https://discourse.brew.sh/t/bash-completion-2-vs-brews-auto-installed-bash-completions/2391/2
if [[ $PS1 && -e "/usr/local/share/bash-completion/bash_completion" ]]; then
export BASH_COMPLETION_COMPAT_DIR="/usr/local/etc/bash_completion.d"
source "/usr/local/share/bash-completion/bash_completion"
elif [[ $PS1 && -e "/usr/local/etc/profile.d/bash_completion.sh" ]]; then
source "/usr/local/etc/profile.d/bash_completion.sh"
elif [[ $PS1 && -e "/etc/bash_completion" ]]; then
source "/etc/bash_completion"
fi
# Cargo rust binaries
[ -d "${HOME}/.cargo/bin" ] && export PATH="${HOME}/.cargo/bin:$PATH"
# Go binaries
[ -x $(hash go) ] && export PATH="$(go env GOPATH)/bin:$PATH"
# Source localrc
[ -f ~/.localrc ] && source ~/.localrc
# Instead of flow control use Ctrl-s for i-search of history
[[ $- == *i* ]] && stty -ixon
# fzf
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash ] && source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash
export FZF_DEFAULT_OPTS="--height=40% --layout=reverse --info=inline --preview='echo {}' --preview-window=down:wrap --no-hscroll --border"