-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbashrc
44 lines (39 loc) · 1004 Bytes
/
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
# Powerline-shell is a great tool.
# Install it via pip: "pip3 install powerline-shell".
# You can then dump the config file with "powerline-shell --generate-config > ~/.powerline-shell.json"
which powerline-shell > /dev/null 2>&1
if [[ $? -eq 0 ]]; then
function _update_ps1() {
PS1="$(powerline-shell $?)"
}
if [ "$TERM" != "linux" ]; then
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
fi
fi
# Set up "Philipp's log" aliases
alias p="philog"
alias pp="philog -pretty"
alias ppd="philog -pretty -dir"
alias pr="philog -rerun"
alias pd="philog -dir"
alias pe="vi .philog.LOGFILE"
alias ph="history | philog -history"
weather() {
city="$@"
[[ -z $city ]] && city=baltimore
curl "http://wttr.in/$city"
}
share() {
scp $1 jhu:public_html/tmp
ssh jhu chmod 644 public_html/tmp/$1
echo http://cs.jhu.edu/~post/tmp/$1
}
case $TERM in
xterm*)
PS1="\[\033]0; \w\007\]${BLUE}\$ ${NONE}"
;;
*)
PS1="\w\$ "
;;
esac
export PS1