X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/08d8972a405e57c7724e9d7fe7529ee32bd14d25..f49ed199817269fbfd6806c3c702190d66200516:/.zsh/zshrc/30_aliases?ds=inline diff --git a/.zsh/zshrc/30_aliases b/.zsh/zshrc/30_aliases index 16005bf..1f5f0a0 100644 --- a/.zsh/zshrc/30_aliases +++ b/.zsh/zshrc/30_aliases @@ -91,19 +91,29 @@ function lless() { sensible-pager ~log/$1 } compdef '_files -W ~log' lless alias tsl='ltail syslog' -alias lsl='lless ~log/syslog' +alias lsl='lless syslog' alias tml='ltail mail.log' -alias lml='lless ~log/mail.log' +alias lml='lless mail.log' alias tal='ltail auth.log' -alias lal='lless ~log/auth.log' +alias lal='lless auth.log' alias tdl='ltail daemon.log' -alias ldl='lless ~log/daemon.log' +alias ldl='lless daemon.log' alias tkl='ltail kern.log' -alias lkl='lless ~log/kern.log' +alias lkl='lless 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