-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbash_profile
More file actions
executable file
·36 lines (28 loc) · 1.14 KB
/
bash_profile
File metadata and controls
executable file
·36 lines (28 loc) · 1.14 KB
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
# useful ls aliases
export CLICOLOR=1
alias ls="ls -CF"
alias la="ls -al"
# share colors between macOS and Linux/`tree`
# specifically highlight dirs, symlinks, and executables
export LSCOLORS=CxFxxxxxBxxxxxxxxxxxxx
export LS_COLORS='di=1;32:ln=1;35:so=0:pi=0:ex=1;31:bd=0:cd=0:su=0:sg=0:tw=0:ow=0'
# replacement for $ prompt with colors
export PS1="\[\e[0;32m\]\u\[\e[m\] \[\e[1;34m\]\W\[\e[m\] \[\e[0;32m\]$\[\e[m\] "
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
# lt command can leverage `tree` to browse faster
# simply pass a number as first arg to change depth
lt() {
pwd
level=$1
# default to 1 if not set
level=${level:-1}
tree -L $level .
}
AG_DEFAULT_OPTS="--ignore .git --ignore node_modules --ignore .DS_Store"
# configure the_silver_surfer (ag) to ignore unwanted files/folders
alias ag="ag $AG_DEFAULT_OPTS"
# configure fzf to use ag and ignore various unwanted files/folders
export FZF_DEFAULT_COMMAND="ag $AG_DEFAULT_OPTS --hidden -g ''"
# configure fzf to open `vi` on enter, and show preview with `cat`
export FZF_DEFAULT_OPTS="--bind 'enter:execute(vim {})' --preview 'cat {}'"