mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
[Fix #60] Do not use parentheses in function names
This commit is contained in:
parent
a3b92bb053
commit
6a9a4ea8d6
22 changed files with 66 additions and 67 deletions
14
utility.zsh
14
utility.zsh
|
|
@ -14,42 +14,42 @@ alias history-stat="history | awk '{print \$2}' | sort | uniq -c | sort -n -r |
|
|||
alias http-serve='python -m SimpleHTTPServer'
|
||||
|
||||
# Makes a directory and changes to it.
|
||||
function mkdcd() {
|
||||
function mkdcd {
|
||||
[[ -n "$1" ]] && mkdir -p "$1" && cd "$1"
|
||||
}
|
||||
compdef _mkdir mkdcd
|
||||
|
||||
# Changes to a directory and lists its contents.
|
||||
function cdll() {
|
||||
function cdll {
|
||||
builtin cd "$1" && ll
|
||||
}
|
||||
compdef _cd cdll
|
||||
|
||||
# Pushes an entry onto the directory stack and lists its contents.
|
||||
function pushdll() {
|
||||
function pushdll {
|
||||
builtin pushd "$1" && ll
|
||||
}
|
||||
compdef _cd pushdll
|
||||
|
||||
# Pops an entry off the directory stack and lists its contents.
|
||||
function popdll() {
|
||||
function popdll {
|
||||
builtin popd "$1" && ll
|
||||
}
|
||||
compdef _cd popdll
|
||||
|
||||
# Prints columns 1 2 3 ... n.
|
||||
function slit() {
|
||||
function slit {
|
||||
awk "{ print $(for n; do print -n "\$$n,"; done | sed 's/,$//') }"
|
||||
}
|
||||
|
||||
# Displays user owned process status.
|
||||
function pmine() {
|
||||
function pmine {
|
||||
ps "$@" -U "$USER" -o pid,%cpu,%mem,command
|
||||
}
|
||||
compdef _ps pmine
|
||||
|
||||
# Finds files and executes a command on them.
|
||||
function find-exec() {
|
||||
function find-exec {
|
||||
find . -type f -iname "*${1:-}*" -exec "${2:-file}" '{}' \;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue