Merge remote-tracking branch 'upstream/master'

Alpha Chen 2 years ago
commit 40b62ca848
Signed by: alpha
SSH Key Fingerprint: SHA256:3fOT8fiYQG/aK9ntivV3Bqtg8AYQ7q4nV6ZgihOA20g

@ -17,6 +17,13 @@ Sets directory options and defines directory aliases.
## Aliases ## Aliases
Aliases are enabled by default. To disable them, add the following to
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
```sh
zstyle ':prezto:module:directory:alias' skip 'yes'
```
- `d` prints the contents of the directory stack. - `d` prints the contents of the directory stack.
- `1 ... 9` changes the directory to the **n** previous one. - `1 ... 9` changes the directory to the **n** previous one.

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

@ -12,6 +12,13 @@ execution of `carton`.
## Aliases ## Aliases
Aliases are enabled by default. To disable them, add the following to
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
```sh
zstyle ':prezto:module:emacs:alias' skip 'yes'
```
### Carton ### Carton
- `cai` installs dependencies. - `cai` installs dependencies.

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

@ -19,6 +19,13 @@ instead of the bundled version.
## Aliases ## Aliases
Aliases are enabled by default. To disable them, add the following to
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
```sh
zstyle ':prezto:module:fasd:alias' skip 'yes'
```
- `j` changes the current working directory interactively. - `j` changes the current working directory interactively.
## Completion ## Completion

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

@ -44,8 +44,7 @@ _gnu_utility_cmds=(
'libtool' 'libtoolize' 'libtool' 'libtoolize'
# Miscellaneous # Miscellaneous
'egrep' 'fgrep' 'getopt' 'grep' 'indent' 'make' 'sed' 'tar' 'time' 'units' 'awk' 'getopt' 'grep' 'indent' 'make' 'sed' 'tar' 'time' 'units' 'which'
'which'
) )
# Wrap GNU utilities in functions. # Wrap GNU utilities in functions.

@ -36,6 +36,13 @@ Alternately, you can set `HISTFILE` manually to _`${ZDOTDIR:-$HOME}/.zhistory`_.
## Aliases ## Aliases
Aliases are enabled by default. To disable them, add the following to
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
```sh
zstyle ':prezto:module:history:alias' skip 'yes'
```
- `history-stat` lists the ten most used commands - `history-stat` lists the ten most used commands
## Settings ## Settings

@ -26,42 +26,18 @@ setopt HIST_BEEP # Beep when accessing non-existent history.
# Variables # Variables
# #
zstyle -s ':prezto:module:history' histfile '_pmh_histfile' || _pmh_histfile="${HISTFILE:-${ZDOTDIR:-$HOME}/.zsh_history}" zstyle -s ':prezto:module:history' histfile 'HISTFILE' \
zstyle -s ':prezto:module:history' histsize '_pmh_histsize' || _pmh_histsize=10000 || HISTFILE="${HISTFILE:-${ZDOTDIR:-$HOME}/.zsh_history}" # The path to the history file.
zstyle -s ':prezto:module:history' savehist '_pmh_savehist' || _pmh_savehist=${_pmh_histsize} zstyle -s ':prezto:module:history' histsize 'HISTSIZE' \
HISTFILE="${_pmh_histfile}" # The path to the history file. || HISTSIZE=10000 # The maximum number of events to save in the internal history.
HISTSIZE="${_pmh_histsize}" # The maximum number of events to save in the internal history. zstyle -s ':prezto:module:history' savehist 'SAVEHIST' \
SAVEHIST="${_pmh_savehist}" # The maximum number of events to save in the history file. || SAVEHIST=$HISTSIZE # The maximum number of events to save in the history file.
unset _pmh_{hist{file,size},savehist}
# #
# Aliases # Aliases
# #
if ! zstyle -t ':prezto:module:history:alias' skip; then
# Lists the ten most used commands. # Lists the ten most used commands.
alias history-stat="history 0 | awk '{print \$2}' | sort | uniq -c | sort -n -r | head" alias history-stat="history 0 | awk '{print \$2}' | sort | uniq -c | sort -n -r | head"
if [[ -s "${OLD_HISTFILE::=${HISTFILE:h}/.zhistory}" ]]; then
# New 'HISTFILE' doesn't exist yet, rename legacy one if available and notify.
if [[ ! -s "$HISTFILE" ]]; then
<<EON
NOTICE: Default path of 'HISTFILE' has changed from '${OLD_HISTFILE/#$HOME/~}'
to '${HISTFILE/#$HOME/~}'.
Attempting to rename the existing 'HISTFILE' ...
EON
command mv -v "$OLD_HISTFILE" "$HISTFILE"
# New 'HISTFILE' does exist and is older than legacy one, just warn.
elif [[ "$OLD_HISTFILE" -nt "$HISTFILE" ]]; then
<<EOW
WARNING: Default path of 'HISTFILE' has changed from '${OLD_HISTFILE/#$HOME/~}'
to '${HISTFILE/#$HOME/~}'.
Either set 'HISTFILE' in '${${0:h}/#$HOME/~}'
or move previous history from '${OLD_HISTFILE/#$HOME/~}' to
'${HISTFILE/#$HOME/~}'.
EOW
fi
unset OLD_HISTFILE
fi fi

@ -12,6 +12,13 @@ brew shellenv
## Aliases ## Aliases
Aliases are enabled by default. To disable them, add the following to
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
```sh
zstyle ':prezto:module:homebrew:alias' skip 'yes'
```
### Homebrew Core ### Homebrew Core
- `brewc` cleans outdated brews and their cached archives. - `brewc` cleans outdated brews and their cached archives.

@ -29,6 +29,7 @@ fi
# #
# Homebrew # Homebrew
if ! zstyle -t ':prezto:module:homebrew:alias' skip; then
alias brewc='brew cleanup' alias brewc='brew cleanup'
alias brewi='brew install' alias brewi='brew install'
alias brewL='brew leaves' alias brewL='brew leaves'
@ -45,3 +46,4 @@ 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

@ -4,6 +4,13 @@ Defines MacPorts aliases and adds MacPorts directories to path variables.
## Aliases ## Aliases
Aliases are enabled by default. To disable them, add the following to
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
```sh
zstyle ':prezto:module:macports:alias' skip 'yes'
```
- `portc` cleans the files used to build ports. - `portc` cleans the files used to build ports.
- `porti` installs a port. - `porti` installs a port.
- `ports` searches for a port. - `ports` searches for a port.

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

@ -29,6 +29,13 @@ _`$XDG_CONFIG_HOME/nvm`_, _`~/.nvm`_, or is installed with homebrew.
## Aliases ## Aliases
Aliases are enabled by default. To disable them, add the following to
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
```sh
zstyle ':prezto:module:node:alias' skip 'yes'
```
### npm ### npm
- `npmi` install a package. - `npmi` install a package.

@ -48,6 +48,7 @@ N_PREFIX="${XDG_CONFIG_HOME:-$HOME/.config}/n" # The path to 'n' cache.
# Aliases # Aliases
# #
if ! zstyle -t ':prezto:module:node:alias' skip; then
# npm # npm
alias npmi='npm install' alias npmi='npm install'
alias npml='npm list' alias npml='npm list'
@ -63,3 +64,4 @@ 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

@ -9,7 +9,7 @@ function manp {
local page local page
if (( $# > 0 )); then if (( $# > 0 )); then
for page in "$@"; do for page in "$@"; do
man -t "$page" | open -f -a Preview mandoc -T pdf "$(/usr/bin/man -w $page)" | open -fa Preview
done done
else else
print 'What manual page do you want?' >&2 print 'What manual page do you want?' >&2

@ -40,6 +40,13 @@ The subcommands of _plenv_ is similar with _rbenv_.
## Aliases ## Aliases
Aliases are enabled by default. To disable them, add the following to
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
```sh
zstyle ':prezto:module:perl:alias' skip 'yes'
```
### General ### General
- `pl` is short for `perl`. - `pl` is short for `perl`.

@ -61,6 +61,7 @@ fi
# Aliases # Aliases
# #
if ! zstyle -t ':prezto:module:perl:alias' skip; then
# General # General
alias pl='perl' alias pl='perl'
alias pld='perldoc' alias pld='perldoc'
@ -95,3 +96,4 @@ elif (( $+commands[plenv] )); then
alias plvM='plenv migrate-modules' alias plvM='plenv migrate-modules'
alias plvI='plenv install-cpanm' alias plvI='plenv install-cpanm'
fi fi
fi

@ -1 +1 @@
Subproject commit bbbc92bd01592513a6b7739a45b7911af18acaef Subproject commit a66d76f8404bd9e7a26037640e6c892cf5871ff4

@ -1 +1 @@
Subproject commit 8a676a9157d2b0e00e88d06456ac7317f11c0317 Subproject commit 0af598cbed78660066f8a8f4465844501ba5695b

@ -1 +1 @@
Subproject commit 5b458ba5b75f49a8071d53c343f1a23631f7bced Subproject commit 2f13dea466466dde1ba844ba5211e7556f4ae2db

@ -10,18 +10,8 @@ autoload -Uz promptinit && promptinit
# Load the prompt theme. # Load the prompt theme.
zstyle -a ':prezto:module:prompt' theme 'prompt_argv' zstyle -a ':prezto:module:prompt' theme 'prompt_argv'
if [[ "$TERM" == (dumb|linux|*bsd*) ]] || (( $#prompt_argv < 1 )); then if [[ $TERM == (dumb|linux|*bsd*) ]] || (( $#prompt_argv < 1 )); then
prompt 'off' prompt 'off'
elif [[ "$prompt_argv[1]" == 'powerlevel9k' ]] ; then
<<EOW
WARNING: Prezto does not support 'powerlevel9k' anymore as it has
been deprecated and is not supported by its author.
Consider migrating to 'powerlevel10k' instead by setting:
zstyle ':prezto:module:prompt' theme 'powerlevel10k'
in ${${ZDOTDIR:-$HOME}/#$HOME/~}/.zpreztorc.
Switching to prezto default prompt 'sorin'..."
EOW
prompt 'sorin'
else else
prompt "$prompt_argv[@]" prompt "$prompt_argv[@]"
fi fi

@ -124,6 +124,13 @@ zstyle ':prezto:module:python:virtualenv' initialize 'no'
## Aliases ## Aliases
Aliases are enabled by default. To disable them, add the following to
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
```sh
zstyle ':prezto:module:python:alias' skip 'yes'
```
- `py` is short for `python`. - `py` is short for `python`.
- `py2` is short for `python2`. - `py2` is short for `python2`.
- `py3` is short for `python3`. - `py3` is short for `python3`.

@ -1,19 +0,0 @@
#compdef -P pip[0-9.]#
#autoload
#
# Pip completion, delegating to pip to do all the completion work.
#
# Authors:
# Indrajit Raychaudhuri <irc@indrajit.com>
#
if (( $+commands[$words[1]] )); then
function _pip_completion {
compadd -- $( COMP_WORDS="$words[*]" COMP_CWORD=$(( CURRENT - 1 )) \
PIP_AUTO_COMPLETE=1 $words[1] 2>/dev/null )
}
_pip_completion "$@"
fi

@ -50,7 +50,7 @@ fi
unset local_pyenv unset local_pyenv
# Return if requirements are not found. # Return if requirements are not found.
if (( ! $#commands[(i)python[23]#] && ! $+functions[pyenv] && ! $+commands[conda] )); then if (( ! $+commands[(i)python[0-9.]#] && ! $+functions[pyenv] && ! $+commands[conda] )); then
return 1 return 1
fi fi
@ -136,8 +136,8 @@ if (( $+VIRTUALENVWRAPPER_VIRTUALENV || $+commands[virtualenv] )) \
if [[ $pyenv_virtualenvwrapper_plugin_found != "true" ]]; then if [[ $pyenv_virtualenvwrapper_plugin_found != "true" ]]; then
# Fallback to standard 'virtualenvwrapper' if 'python' is available in '$path'. # Fallback to standard 'virtualenvwrapper' if 'python' is available in '$path'.
if (( ! $+VIRTUALENVWRAPPER_PYTHON )) && (( $#commands[(i)python[23]#] )); then if (( ! $+VIRTUALENVWRAPPER_PYTHON )) && (( $+commands[(i)python[0-9.]#] )); then
VIRTUALENVWRAPPER_PYTHON=$commands[(i)python[23]#] VIRTUALENVWRAPPER_PYTHON=$commands[(i)python[0-9.]#]
fi fi
virtualenvwrapper_sources=( virtualenvwrapper_sources=(
@ -171,6 +171,8 @@ fi
# Aliases # Aliases
# #
if ! zstyle -t ':prezto:module:python:alias' skip; then
alias py='python' alias py='python'
alias py2='python2' alias py2='python2'
alias py3='python3' alias py3='python3'
fi

@ -4,6 +4,13 @@ Defines [Ruby on Rails][1] aliases.
## Aliases ## Aliases
Aliases are enabled by default. To disable them, add the following to
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
```sh
zstyle ':prezto:module:rails:alias' skip 'yes'
```
- `ror` is short for `rails`. - `ror` is short for `rails`.
- `rorc` starts the Rails console. - `rorc` starts the Rails console.
- `rordc` starts the Rails console connected to the database. - `rordc` starts the Rails console connected to the database.

@ -19,6 +19,7 @@ fi
# Aliases # Aliases
# #
if ! zstyle -t ':prezto:module:rails:alias' skip; then
alias ror='bundle exec rails' alias ror='bundle exec rails'
alias rorc='bundle exec rails console' alias rorc='bundle exec rails console'
alias rordc='bundle exec rails dbconsole' alias rordc='bundle exec rails dbconsole'
@ -33,3 +34,4 @@ alias rorr='bundle exec rails runner'
alias rors='bundle exec rails server' alias rors='bundle exec rails server'
alias rorsd='bundle exec rails server --debugger' alias rorsd='bundle exec rails server --debugger'
alias rorx='bundle exec rails destroy' alias rorx='bundle exec rails destroy'
fi

@ -54,6 +54,13 @@ dependencies, with [Bundler][5].
## Aliases ## Aliases
Aliases are enabled by default. To disable them, add the following to
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
```sh
zstyle ':prezto:module:ruby:alias' skip 'yes'
```
### General ### General
- `rb` is short for `ruby`. - `rb` is short for `ruby`.

@ -59,6 +59,7 @@ fi
# Aliases # Aliases
# #
if ! zstyle -t ':prezto:module:ruby:alias' skip; then
# General # General
alias rb='ruby' alias rb='ruby'
@ -79,3 +80,4 @@ if (( $+commands[bundle] )); then
&& print vendor/bundle >>! .gitignore \ && print vendor/bundle >>! .gitignore \
&& print vendor/cache >>! .gitignore' && print vendor/cache >>! .gitignore'
fi fi
fi

@ -24,6 +24,13 @@ zstyle ':prezto:module:screen:auto-start' remote 'yes'
## Aliases ## Aliases
Aliases are enabled by default. To disable them, add the following to
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
```sh
zstyle ':prezto:module:screen:alias' skip 'yes'
```
- `scr` is short for `screen`. - `scr` is short for `screen`.
- `scrl` lists sessions/socket directory. - `scrl` lists sessions/socket directory.
- `scrn` starts a new session. - `scrn` starts a new session.

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

@ -53,6 +53,13 @@ Read [iTerm2 and tmux Integration][7] for more information.
## Aliases ## Aliases
Aliases are enabled by default. To disable them, add the following to
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
```sh
zstyle ':prezto:module:tmux:alias' skip 'yes'
```
- `tmuxa` attaches or switches to a tmux session. - `tmuxa` attaches or switches to a tmux session.
- `tmuxl` lists sessions managed by the tmux server. - `tmuxl` lists sessions managed by the tmux server.

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

@ -10,7 +10,10 @@
# Compile the completion dump to increase startup speed. # Compile the completion dump to increase startup speed.
zcompdump="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/zcompdump" zcompdump="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/zcompdump"
if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then
if command mkdir "${zcompdump}.zwc.lock" 2>/dev/null; then
zcompile "$zcompdump" zcompile "$zcompdump"
command rmdir "${zcompdump}.zwc.lock" 2>/dev/null
fi
fi fi
} &! } &!

Loading…
Cancel
Save