about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--.bash_logout13
-rw-r--r--.bashrc3
2 files changed, 15 insertions, 1 deletions
diff --git a/.bash_logout b/.bash_logout
new file mode 100644
index 0000000..df7ab07
--- /dev/null
+++ b/.bash_logout
@@ -0,0 +1,13 @@
+# don't leave behind any stray ssh sessions - kill them when bash exits,
+# unless it was running inside a tmux session (but the idea is to kill
+# ssh sessions running inside tmux!)
+if [ -n "${SSH_CONNECTION}" -a -z "${TMUX}" ]; then
+    for ssh_host in $(grep 'Host\b' .ssh/config|cut -f2 -d' ') ; do
+        ssh_pid=$(ps u|awk "/ssh ${ssh_host}/ && !/grep/{print $2}")
+        [ -n "${ssh_pid}" ] && kill ${ssh_pid} 2>/dev/null
+    done
+fi
+
+if [ "$SHLVL" = 1 ]; then
+    [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
+fi
diff --git a/.bashrc b/.bashrc
index a6b5980..dc56932 100644
--- a/.bashrc
+++ b/.bashrc
@@ -189,7 +189,8 @@ alias vidotclean="rm .*~"
 alias vibinclean="rm ~/bin/*~"
 alias trunc="colrm 80"
 
-alias pc="${HOME}/bin/pocket-cli.py"
+alias pc="pocket-cli.py"
+alias pp='pushbullet push "LGE Nexus 4" link "${1}" "${1}"'
 
 [ ! -x "$(command -v fetch)" -a  -x "$(command -v wget)"  ] && alias fetch="wget"
 [ -f /etc/debian_version ] && alias psearch="apt-cache search"