]> git.donarmstrong.com Git - zsh.git/blobdiff - .zsh/zshrc/30_aliases
add process inspection functions
[zsh.git] / .zsh / zshrc / 30_aliases
index 16005bf82c67da0b31ecd6d7585459f0987d5f42..bdbef14a77118d0501775f3dcb9998fc905ea62a 100644 (file)
@@ -101,9 +101,19 @@ alias ldl='lless ~log/daemon.log'
 alias tkl='ltail kern.log'
 alias lkl='lless ~log/kern.log'
 
+function lgrep() {
+  local pattern="$1"; shift
+  eval egrep "'$pattern'" "~log/${(j: ~log/:)@}"
+}
+
 alias px='ps afux'
 alias mps='ps -ao user,pcpu,start,command'
 
+function of() { lsof -np "$1" }
+compdef _pids of
+
+function psgrep() { ps aux | grep "[${1[1]}]${1[2,-1]}" }
+
 alias bofh='fortune bofh-excuses'
 
 autoload -U baseconv