mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
Renamed lib/ to functions/ and renamed files inside of it.
This commit is contained in:
parent
00d4f280ae
commit
3fd9cf9f86
13 changed files with 2 additions and 2 deletions
60
functions/utility.zsh
Normal file
60
functions/utility.zsh
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
function history-stat() {
|
||||
history | awk '{print $2}' | sort | uniq -c | sort -rn | head
|
||||
}
|
||||
|
||||
function mkdcd() {
|
||||
mkdir -p "$1"
|
||||
cd "$1"
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
function gown() {
|
||||
sudo chown -R "${USER}" "${1:-.}"
|
||||
}
|
||||
|
||||
function reload() {
|
||||
local zshrc="$HOME/.zshrc"
|
||||
if [[ -n "$1" ]]; then
|
||||
zshrc="$1"
|
||||
fi
|
||||
source "$zshrc"
|
||||
}
|
||||
|
||||
function calc() {
|
||||
echo "scale=4; $@" | bc -l
|
||||
}
|
||||
|
||||
function pmine() {
|
||||
ps "$@" -u "$USER" -o pid,%cpu,%mem,command
|
||||
}
|
||||
|
||||
function findexec() {
|
||||
find . -type f -iname "*${1:-}*" -exec "${2:-file}" {} \;
|
||||
}
|
||||
|
||||
function httpserve() {
|
||||
python -m SimpleHTTPServer "$@"
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue