mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-22 19:48:00 +00:00
Merge upstream/master
This commit is contained in:
commit
1a48ae2e54
@ -1 +1 @@
|
||||
Subproject commit d7c796719e6352666f7a9c94da9ddaed10f3217d
|
||||
Subproject commit a7f0106b31c2538a36cab30428e6ca65d9a2ae60
|
@ -12,9 +12,28 @@ if [[ -s '/etc/zsh_command_not_found' ]]; then
|
||||
# Load command-not-found on Arch Linux-based distributions.
|
||||
elif [[ -s '/usr/share/doc/pkgfile/command-not-found.zsh' ]]; then
|
||||
source '/usr/share/doc/pkgfile/command-not-found.zsh'
|
||||
# Load command-not-found on macOS when homebrew tap is configured.
|
||||
elif [[ -s '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-command-not-found/handler.sh' ]]; then
|
||||
source '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-command-not-found/handler.sh'
|
||||
# Load command-not-found on macOS when Homebrew tap is configured.
|
||||
# To avoid performance penalty, we do not use Homebrew's ruby based command
|
||||
# lookup mechanism (viz., `brew command command-not-found-init`) and instead
|
||||
# `find` it ourselves from `TAP_DIRECTORY` defined internally in Homebrew.
|
||||
elif (( $+commands[brew] )); then
|
||||
cnf_command=("$(brew --repository 2> /dev/null)"/Library/Taps/*/*/cmd/brew-command-not-found-init(|.rb)(.NL+0))
|
||||
if (( $#cnf_command )); then
|
||||
cache_file="${TMPDIR:-/tmp}/prezto-brew-command-not-found-cache.$UID.zsh"
|
||||
|
||||
if [[ "${${(@o)cnf_command}[1]}" -nt "$cache_file" \
|
||||
|| "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" \
|
||||
|| ! -s "$cache_file" ]]; then
|
||||
# brew command-not-found-init is slow; cache its output.
|
||||
brew command-not-found-init >! "$cache_file" 2> /dev/null
|
||||
fi
|
||||
|
||||
source "$cache_file"
|
||||
|
||||
unset cache_file
|
||||
fi
|
||||
|
||||
unset cnf_command
|
||||
# Return if requirements are not found.
|
||||
else
|
||||
return 1
|
||||
|
@ -68,6 +68,7 @@ if ! zstyle -t ':prezto:module:git:alias' skip 'yes'; then
|
||||
alias gcr='git revert'
|
||||
alias gcR='git reset "HEAD^"'
|
||||
alias gcs='git show'
|
||||
alias gpS='git show --pretty=short --show-signature'
|
||||
alias gcl='git-commit-lost'
|
||||
alias gcy='git cherry -v --abbrev'
|
||||
alias gcY='git cherry -v'
|
||||
@ -190,6 +191,7 @@ if ! zstyle -t ':prezto:module:git:alias' skip 'yes'; then
|
||||
alias glg='git log --topo-order --all --graph --pretty=format:"${_git_log_oneline_format}"'
|
||||
alias glb='git log --topo-order --pretty=format:"${_git_log_brief_format}"'
|
||||
alias glc='git shortlog --summary --numbered'
|
||||
alias glS='git log --show-signature'
|
||||
|
||||
# Merge (m)
|
||||
alias gm='git merge'
|
||||
@ -255,6 +257,8 @@ if ! zstyle -t ':prezto:module:git:alias' skip 'yes'; then
|
||||
# Tag (t)
|
||||
alias gt='git tag'
|
||||
alias gtl='git tag -l'
|
||||
alias gts='git tag -s'
|
||||
alias gtv='git verify-tag'
|
||||
|
||||
# Working Copy (w)
|
||||
alias gws='git status --ignore-submodules=${_git_status_ignore_submodules} --short'
|
||||
|
@ -11,8 +11,10 @@ if [[ -s "$HOME/.nvm/nvm.sh" ]]; then
|
||||
source "$HOME/.nvm/nvm.sh"
|
||||
|
||||
# Load package manager installed NVM into the shell session.
|
||||
elif (( $+commands[brew] )) && [[ -d "$(brew --prefix nvm 2> /dev/null)" ]]; then
|
||||
elif (( $+commands[brew] )) && \
|
||||
[[ -d "${nvm_prefix::="$(brew --prefix 2> /dev/null)"/opt/nvm}" ]]; then
|
||||
source "$(brew --prefix nvm)/nvm.sh"
|
||||
unset nvm_prefix
|
||||
|
||||
# Load manually installed nodenv into the shell session.
|
||||
elif [[ -s "$HOME/.nodenv/bin/nodenv" ]]; then
|
||||
@ -28,18 +30,28 @@ elif (( ! $+commands[node] )); then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Load NPM completion.
|
||||
if (( $+commands[npm] )); then
|
||||
cache_file="${TMPDIR:-/tmp}/prezto-node-cache.$UID.zsh"
|
||||
# Load NPM and known helper completions.
|
||||
typeset -A compl_commands=(
|
||||
npm 'npm completion'
|
||||
grunt 'grunt --completion=zsh'
|
||||
gupl 'gulp --completion=zsh'
|
||||
)
|
||||
|
||||
if [[ "$commands[npm]" -nt "$cache_file" \
|
||||
for compl_command in "${(k)compl_commands[@]}"; do
|
||||
if (( $+commands[$compl_command] )); then
|
||||
cache_file="${TMPDIR:-/tmp}/prezto-$compl_command-cache.$UID.zsh"
|
||||
|
||||
# Completion commands are slow; cache their output if old or missing.
|
||||
if [[ "$commands[$compl_command]" -nt "$cache_file" \
|
||||
|| "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" \
|
||||
|| ! -s "$cache_file" ]]; then
|
||||
# npm is slow; cache its output.
|
||||
npm completion >! "$cache_file" 2> /dev/null
|
||||
command ${=compl_commands[$compl_command]} >! "$cache_file" 2> /dev/null
|
||||
fi
|
||||
|
||||
source "$cache_file"
|
||||
|
||||
unset cache_file
|
||||
fi
|
||||
done
|
||||
|
||||
unset compl_command{s,}
|
||||
|
2
modules/prompt/external/powerlevel9k
vendored
2
modules/prompt/external/powerlevel9k
vendored
@ -1 +1 @@
|
||||
Subproject commit 358c105de7aa5e8109788adf65c08c44e368d418
|
||||
Subproject commit 2f4b15041fe31d85dc9ef705b818c3a0e6985da3
|
@ -150,7 +150,7 @@ fi
|
||||
|
||||
# Load PIP completion.
|
||||
if (( $#commands[(i)pip(|[23])] )); then
|
||||
cache_file="${TMPDIR:-/tmp}/prezto-python-cache.$UID.zsh"
|
||||
cache_file="${TMPDIR:-/tmp}/prezto-pip-cache.$UID.zsh"
|
||||
|
||||
# Detect and use one available from among 'pip', 'pip2', 'pip3' variants
|
||||
pip_command="$commands[(i)pip(|[23])]"
|
||||
@ -160,10 +160,11 @@ if (( $#commands[(i)pip(|[23])] )); then
|
||||
|| ! -s "$cache_file" ]]; then
|
||||
# pip is slow; cache its output. And also support 'pip2', 'pip3' variants
|
||||
$pip_command completion --zsh \
|
||||
| sed -e "s|compctl -K [-_[:alnum:]]* pip|& pip2 pip3|" >! "$cache_file" 2> /dev/null
|
||||
| sed -e "s|\(compctl -K [-_[:alnum:]]*\) pip.*|\1 pip pip2 pip3|" >! "$cache_file" 2> /dev/null
|
||||
fi
|
||||
|
||||
source "$cache_file"
|
||||
|
||||
unset cache_file pip_command
|
||||
fi
|
||||
|
||||
|
@ -22,7 +22,7 @@ if grep -q 'xattrs' <(rsync --help 2>&1); then
|
||||
fi
|
||||
|
||||
# macOS and HFS+ Enhancements
|
||||
# http://help.bombich.com/kb/overview/credits#opensource
|
||||
# https://bombich.com/kb/ccc5/credits
|
||||
if [[ "$OSTYPE" == darwin* ]] && grep -q 'file-flags' <(rsync --help 2>&1); then
|
||||
_rsync_cmd="${_rsync_cmd} --crtimes --fileflags --protect-decmpfs --force-change"
|
||||
fi
|
||||
|
@ -9,6 +9,9 @@ Additionally, if this module is used in conjunction with the
|
||||
*history-substring-search* module, this module must be loaded **before** the
|
||||
*history-substring-search* module.
|
||||
|
||||
To elaborate: The relative order of loading the modules would be
|
||||
'syntax-highlighting', 'history-substring-search' and 'prompt'.
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user