mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-22 02:18:01 +00:00
Merge upstream/master
This commit is contained in:
commit
aebed776a0
@ -17,6 +17,13 @@ Sets directory options and defines directory 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.
|
||||
- `1 ... 9` changes the directory to the **n** previous one.
|
||||
|
||||
|
@ -12,6 +12,13 @@ execution of `carton`.
|
||||
|
||||
## 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
|
||||
|
||||
- `cai` installs dependencies.
|
||||
|
@ -19,6 +19,13 @@ instead of the bundled version.
|
||||
|
||||
## 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.
|
||||
|
||||
## Completion
|
||||
|
@ -44,8 +44,7 @@ _gnu_utility_cmds=(
|
||||
'libtool' 'libtoolize'
|
||||
|
||||
# Miscellaneous
|
||||
'awk' 'egrep' 'fgrep' 'getopt' 'grep' 'indent' 'make' 'sed' 'tar' 'time'
|
||||
'units' 'which'
|
||||
'awk' 'getopt' 'grep' 'indent' 'make' 'sed' 'tar' 'time' 'units' 'which'
|
||||
)
|
||||
|
||||
# Wrap GNU utilities in functions.
|
||||
|
@ -36,6 +36,13 @@ Alternately, you can set `HISTFILE` manually to _`${ZDOTDIR:-$HOME}/.zhistory`_.
|
||||
|
||||
## 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
|
||||
|
||||
## Settings
|
||||
|
@ -10,29 +10,28 @@
|
||||
# Options
|
||||
#
|
||||
|
||||
setopt BANG_HIST # Treat the '!' character specially during expansion.
|
||||
setopt EXTENDED_HISTORY # Write the history file in the ':start:elapsed;command' format.
|
||||
setopt SHARE_HISTORY # Share history between all sessions.
|
||||
setopt HIST_EXPIRE_DUPS_FIRST # Expire a duplicate event first when trimming history.
|
||||
setopt HIST_IGNORE_DUPS # Do not record an event that was just recorded again.
|
||||
setopt HIST_IGNORE_ALL_DUPS # Delete an old recorded event if a new event is a duplicate.
|
||||
setopt HIST_FIND_NO_DUPS # Do not display a previously found event.
|
||||
setopt HIST_IGNORE_SPACE # Do not record an event starting with a space.
|
||||
setopt HIST_SAVE_NO_DUPS # Do not write a duplicate event to the history file.
|
||||
setopt HIST_VERIFY # Do not execute immediately upon history expansion.
|
||||
setopt HIST_BEEP # Beep when accessing non-existent history.
|
||||
setopt BANG_HIST # Treat the '!' character specially during expansion.
|
||||
setopt EXTENDED_HISTORY # Write the history file in the ':start:elapsed;command' format.
|
||||
setopt SHARE_HISTORY # Share history between all sessions.
|
||||
setopt HIST_EXPIRE_DUPS_FIRST # Expire a duplicate event first when trimming history.
|
||||
setopt HIST_IGNORE_DUPS # Do not record an event that was just recorded again.
|
||||
setopt HIST_IGNORE_ALL_DUPS # Delete an old recorded event if a new event is a duplicate.
|
||||
setopt HIST_FIND_NO_DUPS # Do not display a previously found event.
|
||||
setopt HIST_IGNORE_SPACE # Do not record an event starting with a space.
|
||||
setopt HIST_SAVE_NO_DUPS # Do not write a duplicate event to the history file.
|
||||
setopt HIST_VERIFY # Do not execute immediately upon history expansion.
|
||||
setopt HIST_BEEP # Beep when accessing non-existent history.
|
||||
|
||||
#
|
||||
# Variables
|
||||
#
|
||||
|
||||
zstyle -s ':prezto:module:history' histfile '_pmh_histfile' || _pmh_histfile="${HISTFILE:-${ZDOTDIR:-$HOME}/.zsh_history}"
|
||||
zstyle -s ':prezto:module:history' histsize '_pmh_histsize' || _pmh_histsize=10000
|
||||
zstyle -s ':prezto:module:history' savehist '_pmh_savehist' || _pmh_savehist=${_pmh_histsize}
|
||||
HISTFILE="${_pmh_histfile}" # The path to the history file.
|
||||
HISTSIZE="${_pmh_histsize}" # The maximum number of events to save in the internal history.
|
||||
SAVEHIST="${_pmh_savehist}" # The maximum number of events to save in the history file.
|
||||
unset _pmh_{hist{file,size},savehist}
|
||||
zstyle -s ':prezto:module:history' histfile 'HISTFILE' \
|
||||
|| HISTFILE="${HISTFILE:-${ZDOTDIR:-$HOME}/.zsh_history}" # The path to the history file.
|
||||
zstyle -s ':prezto:module:history' histsize 'HISTSIZE' \
|
||||
|| HISTSIZE=10000 # The maximum number of events to save in the internal history.
|
||||
zstyle -s ':prezto:module:history' savehist 'SAVEHIST' \
|
||||
|| SAVEHIST=$HISTSIZE # The maximum number of events to save in the history file.
|
||||
|
||||
#
|
||||
# Aliases
|
||||
@ -42,28 +41,3 @@ if ! zstyle -t ':prezto:module:history:alias' skip; then
|
||||
# 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
|
||||
|
||||
# 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
|
||||
|
@ -12,6 +12,13 @@ brew shellenv
|
||||
|
||||
## 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
|
||||
|
||||
- `brewc` cleans outdated brews and their cached archives.
|
||||
|
@ -4,6 +4,13 @@ Defines MacPorts aliases and adds MacPorts directories to path variables.
|
||||
|
||||
## 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.
|
||||
- `porti` installs a port.
|
||||
- `ports` searches for a port.
|
||||
|
@ -29,6 +29,13 @@ _`$XDG_CONFIG_HOME/nvm`_, _`~/.nvm`_, or is installed with homebrew.
|
||||
|
||||
## 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
|
||||
|
||||
- `npmi` install a package.
|
||||
|
@ -40,6 +40,13 @@ The subcommands of _plenv_ is similar with _rbenv_.
|
||||
|
||||
## 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
|
||||
|
||||
- `pl` is short for `perl`.
|
||||
|
2
modules/prompt/external/async
vendored
2
modules/prompt/external/async
vendored
@ -1 +1 @@
|
||||
Subproject commit bbbc92bd01592513a6b7739a45b7911af18acaef
|
||||
Subproject commit a66d76f8404bd9e7a26037640e6c892cf5871ff4
|
2
modules/prompt/external/powerlevel10k
vendored
2
modules/prompt/external/powerlevel10k
vendored
@ -1 +1 @@
|
||||
Subproject commit a066b55f855c8e488d3ea9e26e861bdd5ecd4fe8
|
||||
Subproject commit 0af598cbed78660066f8a8f4465844501ba5695b
|
2
modules/prompt/external/pure
vendored
2
modules/prompt/external/pure
vendored
@ -1 +1 @@
|
||||
Subproject commit 5b458ba5b75f49a8071d53c343f1a23631f7bced
|
||||
Subproject commit 2f13dea466466dde1ba844ba5211e7556f4ae2db
|
@ -10,18 +10,8 @@ autoload -Uz promptinit && promptinit
|
||||
|
||||
# Load the prompt theme.
|
||||
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'
|
||||
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
|
||||
prompt "$prompt_argv[@]"
|
||||
fi
|
||||
|
@ -124,6 +124,13 @@ zstyle ':prezto:module:python:virtualenv' initialize 'no'
|
||||
|
||||
## 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`.
|
||||
- `py2` is short for `python2`.
|
||||
- `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
|
||||
|
||||
# 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
|
||||
fi
|
||||
|
||||
@ -136,8 +136,8 @@ if (( $+VIRTUALENVWRAPPER_VIRTUALENV || $+commands[virtualenv] )) \
|
||||
|
||||
if [[ $pyenv_virtualenvwrapper_plugin_found != "true" ]]; then
|
||||
# Fallback to standard 'virtualenvwrapper' if 'python' is available in '$path'.
|
||||
if (( ! $+VIRTUALENVWRAPPER_PYTHON )) && (( $#commands[(i)python[23]#] )); then
|
||||
VIRTUALENVWRAPPER_PYTHON=$commands[(i)python[23]#]
|
||||
if (( ! $+VIRTUALENVWRAPPER_PYTHON )) && (( $+commands[(i)python[0-9.]#] )); then
|
||||
VIRTUALENVWRAPPER_PYTHON=$commands[(i)python[0-9.]#]
|
||||
fi
|
||||
|
||||
virtualenvwrapper_sources=(
|
||||
|
@ -4,6 +4,13 @@ Defines [Ruby on Rails][1] 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`.
|
||||
- `rorc` starts the Rails console.
|
||||
- `rordc` starts the Rails console connected to the database.
|
||||
|
@ -54,6 +54,13 @@ dependencies, with [Bundler][5].
|
||||
|
||||
## 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
|
||||
|
||||
- `rb` is short for `ruby`.
|
||||
|
@ -24,6 +24,13 @@ zstyle ':prezto:module:screen:auto-start' remote 'yes'
|
||||
|
||||
## 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`.
|
||||
- `scrl` lists sessions/socket directory.
|
||||
- `scrn` starts a new session.
|
||||
|
@ -53,6 +53,13 @@ Read [iTerm2 and tmux Integration][7] for more information.
|
||||
|
||||
## 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.
|
||||
- `tmuxl` lists sessions managed by the tmux server.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user