extend the conditionals for all modules except utility
This commit is contained in:
parent
d2c14fecb9
commit
b3f1d9ff2c
17 changed files with 133 additions and 53 deletions
|
@ -26,6 +26,11 @@ unsetopt CLOBBER # Do not overwrite existing files with > and >>.
|
|||
# Aliases
|
||||
#
|
||||
|
||||
# Return if conditions are unsatistied
|
||||
if ! zstyle -t ':prezto:alias' pmodule all directory; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
alias d='dirs -v'
|
||||
for index ({1..9}) alias "$index"="cd +${index}"; unset index
|
||||
|
||||
|
|
|
@ -16,6 +16,11 @@ fi
|
|||
# Aliases
|
||||
#
|
||||
|
||||
# Return if conditions are unsatistied
|
||||
if ! zstyle -t ':prezto:alias' pmodule all dpkg; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Cleans the cache.
|
||||
alias debc='sudo apt-get clean && sudo apt-get autoclean'
|
||||
|
||||
|
|
|
@ -49,6 +49,11 @@ function fasd_cd {
|
|||
# Aliases
|
||||
#
|
||||
|
||||
# Return if conditions are unsatistied
|
||||
if ! zstyle -t ':prezto:alias' pmodule all fasd; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Changes the current working directory interactively.
|
||||
alias j='fasd_cd -i'
|
||||
|
||||
|
|
|
@ -22,15 +22,15 @@ zstyle -s ':prezto:module:git:log:brief' format '_git_log_brief_format' \
|
|||
zstyle -s ':prezto:module:git:status:ignore' submodules '_git_status_ignore_submodules' \
|
||||
|| _git_status_ignore_submodules='none'
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
||||
# Return if conditions are unsatistied
|
||||
if ! zstyle -t ':prezto:alias' pmodule all git; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
||||
# Git
|
||||
alias g='git'
|
||||
|
||||
|
|
|
@ -35,5 +35,10 @@ setopt HIST_BEEP # Beep when accessing non-existent history.
|
|||
# Aliases
|
||||
#
|
||||
|
||||
# Return if conditions are unsatistied
|
||||
if ! zstyle -t ':prezto:alias' pmodule all history; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Lists the ten most used commands.
|
||||
alias history-stat="history 0 | awk '{print \$2}' | sort | uniq -c | sort -n -r | head"
|
||||
|
|
|
@ -37,6 +37,11 @@ path=(
|
|||
# Aliases
|
||||
#
|
||||
|
||||
# Return if conditions are unsatistied
|
||||
if ! zstyle -t ':prezto:alias' pmodule all macports; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
alias portc='sudo port clean --all installed'
|
||||
alias porti='sudo port install'
|
||||
alias ports='port search'
|
||||
|
|
|
@ -10,16 +10,6 @@ if [[ "$OSTYPE" != darwin* ]]; then
|
|||
return 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
||||
# Change directory to the current Finder directory.
|
||||
alias cdf='cd "$(pfd)"'
|
||||
|
||||
# Push directory to the current Finder directory.
|
||||
alias pushdf='pushd "$(pfd)"'
|
||||
|
||||
#
|
||||
# Functions
|
||||
#
|
||||
|
@ -37,3 +27,18 @@ function rm-osx-cruft {
|
|||
\) -print0 | xargs -0 rm -rf
|
||||
}
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
||||
# Return if conditions are unsatistied
|
||||
if ! zstyle -t ':prezto:alias' pmodule all osx; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Change directory to the current Finder directory.
|
||||
alias cdf='cd "$(pfd)"'
|
||||
|
||||
# Push directory to the current Finder directory.
|
||||
alias pushdf='pushd "$(pfd)"'
|
||||
|
||||
|
|
|
@ -18,6 +18,11 @@ fi
|
|||
# Frontend
|
||||
#
|
||||
|
||||
# Return if conditions are unsatistied
|
||||
if ! zstyle -t ':prezto:alias' pmodule all pacman; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Get the Pacman frontend.
|
||||
zstyle -s ':prezto:module:pacman' frontend '_pacman_frontend'
|
||||
|
||||
|
|
|
@ -43,6 +43,11 @@ fi
|
|||
# Aliases
|
||||
#
|
||||
|
||||
# Return if conditions are unsatistied
|
||||
if ! zstyle -t ':prezto:alias' pmodule all perl; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# General
|
||||
alias pl='perl'
|
||||
alias pld='perldoc'
|
||||
|
|
|
@ -42,6 +42,11 @@ fi
|
|||
# Aliases
|
||||
#
|
||||
|
||||
# Return if conditions are unsatistied
|
||||
if ! zstyle -t ':prezto:alias' pmodule all python; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
alias py='python'
|
||||
|
||||
# pythonz
|
||||
|
|
|
@ -16,6 +16,11 @@ fi
|
|||
# Aliases (Compatible with Rails 2)
|
||||
#
|
||||
|
||||
# Return if conditions are unsatistied
|
||||
if ! zstyle -t ':prezto:alias' pmodule all rails; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
alias ror='rails'
|
||||
alias rorc='_rails-command console'
|
||||
alias rordc='_rails-command dbconsole'
|
||||
|
|
|
@ -14,6 +14,11 @@ fi
|
|||
# Aliases
|
||||
#
|
||||
|
||||
# Return if conditions are unsatistied
|
||||
if ! zstyle -t ':prezto:alias' pmodule all rsync; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
_rsync_cmd='rsync --verbose --progress --human-readable --compress --archive --hard-links --one-file-system'
|
||||
|
||||
# Mac OS X and HFS+ Enhancements
|
||||
|
|
|
@ -40,6 +40,11 @@ fi
|
|||
# Aliases
|
||||
#
|
||||
|
||||
# Return if conditions are unsatistied
|
||||
if ! zstyle -t ':prezto:alias' pmodule all ruby; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# General
|
||||
alias rb='ruby'
|
||||
|
||||
|
|
|
@ -32,6 +32,11 @@ fi
|
|||
# Aliases
|
||||
#
|
||||
|
||||
# Return if conditions are unsatistied
|
||||
if ! zstyle -t ':prezto:alias' pmodule all screen; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
alias scr='screen'
|
||||
alias scrl='screen -list'
|
||||
alias scrn='screen -U -S'
|
||||
|
|
|
@ -40,5 +40,10 @@ fi
|
|||
# Aliases
|
||||
#
|
||||
|
||||
# Return if conditions are unsatistied
|
||||
if ! zstyle -t ':prezto:alias' pmodule all tmux; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
alias tmuxa='tmux attach-session'
|
||||
alias tmuxl='tmux list-sessions'
|
||||
|
|
|
@ -13,10 +13,54 @@ pmodload 'helper' 'spectrum'
|
|||
# Correct commands.
|
||||
setopt CORRECT
|
||||
|
||||
#
|
||||
# Functions
|
||||
#
|
||||
|
||||
# Makes a directory and changes to it.
|
||||
function mkdcd {
|
||||
[[ -n "$1" ]] && mkdir -p "$1" && builtin cd "$1"
|
||||
}
|
||||
|
||||
# Changes to a directory and lists its contents.
|
||||
function cdls {
|
||||
builtin cd "$argv[-1]" && ls "${(@)argv[1,-2]}"
|
||||
}
|
||||
|
||||
# Pushes an entry onto the directory stack and lists its contents.
|
||||
function pushdls {
|
||||
builtin pushd "$argv[-1]" && ls "${(@)argv[1,-2]}"
|
||||
}
|
||||
|
||||
# Pops an entry off the directory stack and lists its contents.
|
||||
function popdls {
|
||||
builtin popd "$argv[-1]" && ls "${(@)argv[1,-2]}"
|
||||
}
|
||||
|
||||
# Prints columns 1 2 3 ... n.
|
||||
function slit {
|
||||
awk "{ print ${(j:,:):-\$${^@}} }"
|
||||
}
|
||||
|
||||
# Finds files and executes a command on them.
|
||||
function find-exec {
|
||||
find . -type f -iname "*${1:-}*" -exec "${2:-file}" '{}' \;
|
||||
}
|
||||
|
||||
# Displays user owned processes status.
|
||||
function psu {
|
||||
ps -U "${1:-$USER}" -o 'pid,%cpu,%mem,command' "${(@)argv[2,-1]}"
|
||||
}
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
||||
# Return if conditions are unsatistied
|
||||
if ! zstyle -t ':prezto:alias' pmodule all utility; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Disable correction.
|
||||
alias ack='nocorrect ack'
|
||||
alias cd='nocorrect cd'
|
||||
|
@ -139,42 +183,3 @@ fi
|
|||
# Serves a directory via HTTP.
|
||||
alias http-serve='python -m SimpleHTTPServer'
|
||||
|
||||
#
|
||||
# Functions
|
||||
#
|
||||
|
||||
# Makes a directory and changes to it.
|
||||
function mkdcd {
|
||||
[[ -n "$1" ]] && mkdir -p "$1" && builtin cd "$1"
|
||||
}
|
||||
|
||||
# Changes to a directory and lists its contents.
|
||||
function cdls {
|
||||
builtin cd "$argv[-1]" && ls "${(@)argv[1,-2]}"
|
||||
}
|
||||
|
||||
# Pushes an entry onto the directory stack and lists its contents.
|
||||
function pushdls {
|
||||
builtin pushd "$argv[-1]" && ls "${(@)argv[1,-2]}"
|
||||
}
|
||||
|
||||
# Pops an entry off the directory stack and lists its contents.
|
||||
function popdls {
|
||||
builtin popd "$argv[-1]" && ls "${(@)argv[1,-2]}"
|
||||
}
|
||||
|
||||
# Prints columns 1 2 3 ... n.
|
||||
function slit {
|
||||
awk "{ print ${(j:,:):-\$${^@}} }"
|
||||
}
|
||||
|
||||
# Finds files and executes a command on them.
|
||||
function find-exec {
|
||||
find . -type f -iname "*${1:-}*" -exec "${2:-file}" '{}' \;
|
||||
}
|
||||
|
||||
# Displays user owned processes status.
|
||||
function psu {
|
||||
ps -U "${1:-$USER}" -o 'pid,%cpu,%mem,command' "${(@)argv[2,-1]}"
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,11 @@ fi
|
|||
# Aliases
|
||||
#
|
||||
|
||||
# Return if conditions are unsatistied
|
||||
if ! zstyle -t ':prezto:alias' pmodule all yum; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
alias yumc='sudo yum clean all' # Cleans the cache.
|
||||
alias yumh='yum history' # Displays history.
|
||||
alias yumi='sudo yum install' # Installs package(s).
|
||||
|
|
Loading…
Add table
Reference in a new issue