-
Notifications
You must be signed in to change notification settings - Fork 1
/
bash_profile
executable file
·45 lines (36 loc) · 1007 Bytes
/
bash_profile
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
export PS1='\D{%T} \w `git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`\n'
export LC_ALL="en_US.UTF-8"
export LANG="en_US"
# Eternal bash history https://stackoverflow.com/a/19533853
export HISTFILESIZE=
export HISTSIZE=
export HISTTIMEFORMAT="[%F %T] "
export HISTFILE=~/.bash_eternal_history
PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
if [ -f /usr/local/share/bash-completion/bash_completion ]; then
. /usr/local/share/bash-completion/bash_completion
fi
alias ..='cd ..'
function remove_DS_Store()
{
find . -name '*.DS_Store' -type f -delete
}
function cdf() {
cd "`osascript -e 'tell app "Finder" to POSIX path of (insertion location as alias)'`"
}
function mkd() {
mkdir -p "$@" && cd "$@"
}
function fs() {
if du -b /dev/null > /dev/null 2>&1; then
local arg=-sbh
else
local arg=-sh
fi
if [[ -n "$@" ]]; then
du $arg -- "$@"
else
du $arg .[^.]* *
fi
}
export PATH="$HOME/.cargo/bin:$PATH"