1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-12-22 15:08:01 +00:00

Add zstyle to skip aliases for additional modules

This commit is contained in:
mattmc3 2023-04-12 22:02:41 -04:00 committed by Kaleb Elwert
parent fc444f57e1
commit da87c79b3a
13 changed files with 145 additions and 119 deletions

View File

@ -25,6 +25,8 @@ unsetopt CLOBBER # Do not overwrite existing files with > and >>.
# Aliases # Aliases
# #
alias -- -='cd -' if ! zstyle -t ':prezto:module:directory:alias' skip; then
alias d='dirs -v' alias -- -='cd -'
for index ({1..9}) alias "$index"="cd +${index}"; unset index alias d='dirs -v'
for index ({1..9}) alias "$index"="cd +${index}"; unset index
fi

View File

@ -19,7 +19,9 @@ source "$HOME/.cask/etc/cask_completion.zsh" 2> /dev/null
# Aliases # Aliases
# #
alias cai='cask install' if ! zstyle -t ':prezto:module:emacs:alias' skip; then
alias cau='cask update' alias cai='cask install'
alias caI='cask init' alias cau='cask update'
alias cae='cask exec' alias caI='cask init'
alias cae='cask exec'
fi

View File

@ -53,5 +53,7 @@ function fasd_cd {
# Aliases # Aliases
# #
# Changes the current working directory interactively. if ! zstyle -t ':prezto:module:fasd:alias' skip; then
alias j='fasd_cd -i' # Changes the current working directory interactively.
alias j='fasd_cd -i'
fi

View File

@ -38,8 +38,10 @@ unset _pmh_{hist{file,size},savehist}
# Aliases # Aliases
# #
# Lists the ten most used commands. if ! zstyle -t ':prezto:module:history:alias' skip; then
alias history-stat="history 0 | awk '{print \$2}' | sort | uniq -c | sort -n -r | head" # Lists the ten most used commands.
alias history-stat="history 0 | awk '{print \$2}' | sort | uniq -c | sort -n -r | head"
fi
if [[ -s "${OLD_HISTFILE::=${HISTFILE:h}/.zhistory}" ]]; then if [[ -s "${OLD_HISTFILE::=${HISTFILE:h}/.zhistory}" ]]; then

View File

@ -29,19 +29,21 @@ fi
# #
# Homebrew # Homebrew
alias brewc='brew cleanup' if ! zstyle -t ':prezto:module:homebrew:alias' skip; then
alias brewi='brew install' alias brewc='brew cleanup'
alias brewL='brew leaves' alias brewi='brew install'
alias brewl='brew list' alias brewL='brew leaves'
alias brewo='brew outdated' alias brewl='brew list'
alias brews='brew search' alias brewo='brew outdated'
alias brewu='brew upgrade' alias brews='brew search'
alias brewx='brew uninstall' alias brewu='brew upgrade'
alias brewx='brew uninstall'
# Homebrew Cask # Homebrew Cask
alias caski='brew install --cask' alias caski='brew install --cask'
alias caskl='brew list --cask' alias caskl='brew list --cask'
alias casko='brew outdated --cask' alias casko='brew outdated --cask'
alias casks='brew search --cask' alias casks='brew search --cask'
alias casku='brew upgrade --cask' alias casku='brew upgrade --cask'
alias caskx='brew uninstall --cask' alias caskx='brew uninstall --cask'
fi

View File

@ -28,10 +28,12 @@ path=(
# Aliases # Aliases
# #
alias portc='sudo port clean --all installed' if ! zstyle -t ':prezto:module:macports:alias' skip; then
alias porti='sudo port install' alias portc='sudo port clean --all installed'
alias ports='port search' alias porti='sudo port install'
alias portU='sudo port selfupdate && sudo port upgrade outdated' alias ports='port search'
alias portu='sudo port upgrade' alias portU='sudo port selfupdate && sudo port upgrade outdated'
alias portX='sudo port -u uninstall' alias portu='sudo port upgrade'
alias portx='sudo port uninstall' alias portX='sudo port -u uninstall'
alias portx='sudo port uninstall'
fi

View File

@ -48,18 +48,20 @@ N_PREFIX="${XDG_CONFIG_HOME:-$HOME/.config}/n" # The path to 'n' cache.
# Aliases # Aliases
# #
# npm if ! zstyle -t ':prezto:module:node:alias' skip; then
alias npmi='npm install' # npm
alias npml='npm list' alias npmi='npm install'
alias npmo='npm outdated' alias npml='npm list'
alias npmp='npm publish' alias npmo='npm outdated'
alias npmP='npm prune' alias npmp='npm publish'
alias npmr='npm run' alias npmP='npm prune'
alias npms='npm search' alias npmr='npm run'
alias npmt='npm test' alias npms='npm search'
alias npmu='npm update' alias npmt='npm test'
alias npmx='npm uninstall' alias npmu='npm update'
alias npmx='npm uninstall'
alias npmci='npm ci' alias npmci='npm ci'
alias npmcit='npm cit' alias npmcit='npm cit'
alias npmit='npm it' alias npmit='npm it'
fi

View File

@ -61,37 +61,39 @@ fi
# Aliases # Aliases
# #
# General if ! zstyle -t ':prezto:module:perl:alias' skip; then
alias pl='perl' # General
alias pld='perldoc' alias pl='perl'
alias ple='perl -wlne' alias pld='perldoc'
alias ple='perl -wlne'
# Perlbrew # Perlbrew
if (( $+commands[perlbrew] )); then if (( $+commands[perlbrew] )); then
alias plb='perlbrew' alias plb='perlbrew'
alias plba='perlbrew available' alias plba='perlbrew available'
alias plbi='perlbrew install' alias plbi='perlbrew install'
alias plbl='perlbrew list' alias plbl='perlbrew list'
alias plbo='perlbrew off' alias plbo='perlbrew off'
alias plbO='perlbrew switch-off' alias plbO='perlbrew switch-off'
alias plbs='perlbrew switch' alias plbs='perlbrew switch'
alias plbu='perlbrew use' alias plbu='perlbrew use'
alias plbx='perlbrew uninstall' alias plbx='perlbrew uninstall'
elif (( $+commands[plenv] )); then elif (( $+commands[plenv] )); then
alias plv='plenv' alias plv='plenv'
alias plvc='plenv commands' alias plvc='plenv commands'
alias plvl='plenv local' alias plvl='plenv local'
alias plvg='plenv global' alias plvg='plenv global'
alias plvs='plenv shell' alias plvs='plenv shell'
alias plvi='plenv install' alias plvi='plenv install'
alias plvu='plenv uninstall' alias plvu='plenv uninstall'
alias plvr='plenv rehash' alias plvr='plenv rehash'
alias plvv='plenv version' alias plvv='plenv version'
alias plvV='plenv versions' alias plvV='plenv versions'
alias plvw='plenv which' alias plvw='plenv which'
alias plvW='plenv whence' alias plvW='plenv whence'
alias plvm='plenv list-modules' alias plvm='plenv list-modules'
alias plvM='plenv migrate-modules' alias plvM='plenv migrate-modules'
alias plvI='plenv install-cpanm' alias plvI='plenv install-cpanm'
fi
fi fi

View File

@ -171,6 +171,8 @@ fi
# Aliases # Aliases
# #
alias py='python' if ! zstyle -t ':prezto:module:python:alias' skip; then
alias py2='python2' alias py='python'
alias py3='python3' alias py2='python2'
alias py3='python3'
fi

View File

@ -19,17 +19,19 @@ fi
# Aliases # Aliases
# #
alias ror='bundle exec rails' if ! zstyle -t ':prezto:module:rails:alias' skip; then
alias rorc='bundle exec rails console' alias ror='bundle exec rails'
alias rordc='bundle exec rails dbconsole' alias rorc='bundle exec rails console'
alias rordm='bundle exec rake db:migrate' alias rordc='bundle exec rails dbconsole'
alias rordM='bundle exec rake db:migrate db:test:clone' alias rordm='bundle exec rake db:migrate'
alias rordr='bundle exec rake db:rollback' alias rordM='bundle exec rake db:migrate db:test:clone'
alias rorg='bundle exec rails generate' alias rordr='bundle exec rake db:rollback'
alias rorl='tail -f "$(ruby-app-root)/log/development.log"' alias rorg='bundle exec rails generate'
alias rorlc='bundle exec rake log:clear' alias rorl='tail -f "$(ruby-app-root)/log/development.log"'
alias rorp='bundle exec rails plugin' alias rorlc='bundle exec rake log:clear'
alias rorr='bundle exec rails runner' alias rorp='bundle exec rails plugin'
alias rors='bundle exec rails server' alias rorr='bundle exec rails runner'
alias rorsd='bundle exec rails server --debugger' alias rors='bundle exec rails server'
alias rorx='bundle exec rails destroy' alias rorsd='bundle exec rails server --debugger'
alias rorx='bundle exec rails destroy'
fi

View File

@ -59,23 +59,25 @@ fi
# Aliases # Aliases
# #
# General if ! zstyle -t ':prezto:module:ruby:alias' skip; then
alias rb='ruby' # General
alias rb='ruby'
# Bundler # Bundler
if (( $+commands[bundle] )); then if (( $+commands[bundle] )); then
alias rbb='bundle' alias rbb='bundle'
alias rbbc='bundle clean' alias rbbc='bundle clean'
alias rbbe='bundle exec' alias rbbe='bundle exec'
alias rbbi='bundle install --path vendor/bundle' alias rbbi='bundle install --path vendor/bundle'
alias rbbl='bundle list' alias rbbl='bundle list'
alias rbbo='bundle open' alias rbbo='bundle open'
alias rbbp='bundle package' alias rbbp='bundle package'
alias rbbu='bundle update' alias rbbu='bundle update'
alias rbbI='rbbi \ alias rbbI='rbbi \
&& bundle package \ && bundle package \
&& print .bundle >>! .gitignore \ && print .bundle >>! .gitignore \
&& print vendor/assets >>! .gitignore \ && print vendor/assets >>! .gitignore \
&& print vendor/bundle >>! .gitignore \ && print vendor/bundle >>! .gitignore \
&& print vendor/cache >>! .gitignore' && print vendor/cache >>! .gitignore'
fi
fi fi

View File

@ -36,7 +36,9 @@ fi
# Aliases # Aliases
# #
alias scr='screen' if ! zstyle -t ':prezto:module:screen:alias' skip; then
alias scrl='screen -list' alias scr='screen'
alias scrn='screen -U -S' alias scrl='screen -list'
alias scrr='screen -a -A -U -D -R' alias scrn='screen -U -S'
alias scrr='screen -a -A -U -D -R'
fi

View File

@ -45,5 +45,7 @@ fi
# Aliases # Aliases
# #
alias tmuxa="tmux $_tmux_iterm_integration new-session -A" if ! zstyle -t ':prezto:module:tmux:alias' skip; then
alias tmuxl='tmux list-sessions' alias tmuxa="tmux $_tmux_iterm_integration new-session -A"
alias tmuxl='tmux list-sessions'
fi