1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-12-23 00:17:59 +00:00

Replace the pmine function with an alias

This commit is contained in:
Colin Hebert 2012-04-11 19:13:07 +01:00 committed by Sorin Ionescu
parent d738392709
commit 213b57ee6f

View File

@ -10,6 +10,9 @@
# Serves a directory via HTTP. # Serves a directory via HTTP.
alias http-serve='python -m SimpleHTTPServer' alias http-serve='python -m SimpleHTTPServer'
# Displays user owned processes status.
alias pmine='ps -U "$USER" -o pid,%cpu,%mem,command'
# Makes a directory and changes to it. # Makes a directory and changes to it.
function mkdcd { function mkdcd {
[[ -n "$1" ]] && mkdir -p "$1" && cd "$1" [[ -n "$1" ]] && mkdir -p "$1" && cd "$1"
@ -39,12 +42,6 @@ function slit {
awk "{ print $(for n; do print -n "\$$n,"; done | sed 's/,$//') }" awk "{ print $(for n; do print -n "\$$n,"; done | sed 's/,$//') }"
} }
# Displays user owned process status.
function pmine {
ps "$@" -U "$USER" -o pid,%cpu,%mem,command
}
compdef _ps pmine 2> /dev/null
# Finds files and executes a command on them. # Finds files and executes a command on them.
function find-exec { function find-exec {
find . -type f -iname "*${1:-}*" -exec "${2:-file}" '{}' \; find . -type f -iname "*${1:-}*" -exec "${2:-file}" '{}' \;