Zsh updates
[~madcoder/dotfiles.git] / config / zsh / 50_aliases
index e498b91..e2ee5c2 100644 (file)
@@ -69,3 +69,11 @@ vman() {
         vim -m -n --noplugin -c "set ft=man" -c "noremap q :q<cr>" -c "Man $@"
     fi
 }
+
+gdbpid() {
+    if test "$1" = $(printf "%d" "$1"); then
+        gdb --pid="$1"
+    else
+        gdb --pid=$(pidof "$1")
+    fi
+}