You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
839 B
61 lines
839 B
14 years ago
|
function history-stat() {
|
||
15 years ago
|
history | awk '{print $2}' | sort | uniq -c | sort -rn | head
|
||
15 years ago
|
}
|
||
|
|
||
14 years ago
|
function mkdcd() {
|
||
|
mkdir -p "$1"
|
||
|
cd "$1"
|
||
15 years ago
|
}
|
||
14 years ago
|
|
||
14 years ago
|
function cdll() {
|
||
|
if [[ -n "$1" ]]; then
|
||
|
builtin cd "$1"
|
||
|
ls -lFhA
|
||
|
else
|
||
|
ls -lFhA
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
function pushdll() {
|
||
|
if [[ -n "$1" ]]; then
|
||
|
builtin pushd "$1"
|
||
|
ls -lFhA
|
||
|
else
|
||
|
ls -lFhA
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
function popdll() {
|
||
|
builtin popd
|
||
|
ls -lFhA
|
||
|
}
|
||
|
|
||
14 years ago
|
function gown() {
|
||
|
sudo chown -R "${USER}" "${1:-.}"
|
||
14 years ago
|
}
|
||
|
|
||
|
function reload() {
|
||
14 years ago
|
local zshrc="$HOME/.zshrc"
|
||
|
if [[ -n "$1" ]]; then
|
||
|
zshrc="$1"
|
||
|
fi
|
||
|
source "$zshrc"
|
||
14 years ago
|
}
|
||
|
|
||
|
function calc() {
|
||
|
echo "scale=4; $@" | bc -l
|
||
|
}
|
||
|
|
||
|
function pmine() {
|
||
14 years ago
|
ps "$@" -u "$USER" -o pid,%cpu,%mem,command
|
||
14 years ago
|
}
|
||
|
|
||
|
function findexec() {
|
||
14 years ago
|
find . -type f -iname "*${1:-}*" -exec "${2:-file}" {} \;
|
||
14 years ago
|
}
|
||
|
|
||
|
function httpserve() {
|
||
14 years ago
|
python -m SimpleHTTPServer "$@"
|
||
14 years ago
|
}
|
||
|
|