-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbashrc
88 lines (72 loc) · 2.16 KB
/
bashrc
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
86
87
88
# vim: set filetype=sh:
# .bashrc
# User-specific aliases and functions
# Source global definitions
if [ -e /etc/bashrc ]; then
. /etc/bashrc
fi
# In this repo
if [ -e ~/.vars ]; then
. ~/.vars
fi
# Not in this repo -- perhaps in a private repo
if [ -e ~/.vars-personal ]; then
. ~/.vars-personal
fi
if [ -e ~/.vars-site-shared ]; then
. ~/.vars-site-shared
fi
if [ -e ~/.vars-site ]; then
. ~/.vars-site
fi
# ----------------------------------------------------------------
# The rest is for interactive shells only.
if [ "${-/i/}" = "$-" ] ; then
return 0
fi
# ----------------------------------------------------------------
if [ -f ~/.vars-tracker ]; then
. ~/.vars-tracker
fi
if [ -f ~/.aliases ]; then
. ~/.aliases
fi
# I use a black background. Replace (dark) blue with cyan for colored
# ls output.
# Later note: this was OK on some OS version; not OK later.
# eval `dircolors|sed s/34/36/g`
# ----------------------------------------------------------------
# Turn the beeping off.
bind 'set bell-style none'
# Bash history-editing option.
#set mark-modified-lines off
# Without this, control-W at end of line on "ls /a/b/c/d" results in "ls".
# With this, control-W at end of line on "ls /a/b/c/d" results in "ls /a/b/c".
stty werase undef
bind '"\C-w": backward-kill-word'
if [ $(uname) = "Linux" ]; then
# Tab-complete `ls $foo/bar` -> `ls \$foo/bar` on Ubuntu 22.04 (EC2)
# Non-broken on Mac these days
shopt -s direxpand
fi
# ----------------------------------------------------------------
# Rust
if [ -f "$HOME/.cargo/.env" ]; then
. "$HOME/.cargo/env"
fi
# ----------------------------------------------------------------
# nvm
export NVM_DIR=~/.nvm
#export NVM_DIR=/usr/local/opt/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
# ----------------------------------------------------------------
if [ -f $HOME/.no-pyenv ]; then
export PATH=$HOME/lbin/python-3.9-links:$PATH
else
export PYENV_ROOT="$HOME/.pyenv"
if [ -d $PYENV_ROOT/bin ] ; then
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
fi
fi