Skip to content

Instantly share code, notes, and snippets.

View wsvn53's full-sized avatar

Ethan wsvn53

View GitHub Profile
@wsvn53
wsvn53 / reload.bash
Last active March 15, 2016 02:28 — forked from appden/reload.bash
Reload your bash profile in all open bash instances
# put this in your bash profile (change the line below if you use .bash_profile)
# refresh profile on USR1 signal
trap 'eval $(PATH= /usr/libexec/path_helper -s) && source ~/.profile' USR1
# send USR1 signal to all bash instances
reload_profile() {
ps -xo pid,command | grep ' \-bash' | awk '{print $1}' | while read pid; do
kill -USR1 $pid
done