forked from sorin-ionescu/prezto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into master
* upstream/master: (25 commits) Add ^_ mapping to undo in viins mode (sorin-ionescu#1860) Add check for empty WORKON_HOME (sorin-ionescu#1861) completion: bump version to tags/0.32.0 (sorin-ionescu#1856) README: fix small grammatical error (sorin-ionescu#1857) utility, helper: add aliases to use with termux terminal emulator (android) (sorin-ionescu#1859) prompt: update powerlevel10k submodule to v1.12.0 git-info: use tab as separator for splitting ahead_and_behind (sorin-ionescu#902) Ask pyenv whether pip exists if installed (sorin-ionescu#1848) Remove `--all` from git alias `glg` (sorin-ionescu#1853) Make .zcomp* location configurable (sorin-ionescu#1842) prompt: update powerlevel10k submodule to v1.11.0 prompt: update powerlevel10k submodule to v1.10.0 [git] Add git pull autostash alias Do not source history-substring-search if already loaded (sorin-ionescu#1830) prompt: update powerlevel10k submodule to v1.7.0 homebrew: load helper dependency Use shallow clone for powerlevel9k and powerlevel10k submodules (sorin-ionescu#1819) fix: regression in homebrew module (sorin-ionescu#1816) prompt: fix usage of zsh-async in sorin prompt (sorin-ionescu#1810) Fix missing dependency on helper module for helpers added in sorin-ionescu#1793 (sorin-ionescu#1811) ...
- Loading branch information
Showing
24 changed files
with
121 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,11 @@ | |
# Sorin Ionescu <[email protected]> | ||
# | ||
|
||
# Load dependencies. | ||
pmodload 'helper' | ||
|
||
# Return if requirements are not found. | ||
if [[ "$OSTYPE" != (darwin|linux)* ]]; then | ||
if ! is-darwin && ! is-linux; then | ||
return 1 | ||
fi | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,11 @@ | |
# Sorin Ionescu <[email protected]> | ||
# | ||
|
||
# Load dependencies. | ||
pmodload 'helper' | ||
|
||
# Return if requirements are not found. | ||
if [[ "$OSTYPE" != darwin* ]]; then | ||
if ! is-darwin; then | ||
return 1 | ||
fi | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,11 @@ | |
# Sorin Ionescu <[email protected]> | ||
# | ||
|
||
# Load dependencies. | ||
pmodload 'helper' | ||
|
||
# Return if requirements are not found. | ||
if [[ "$OSTYPE" != darwin* ]]; then | ||
if ! is-darwin; then | ||
return 1 | ||
fi | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,9 @@ | |
# Patrick Bos <[email protected]> | ||
# | ||
|
||
# Load dependencies | ||
pmodload 'helper' | ||
|
||
# Load manually installed pyenv into the path | ||
if [[ -s "${PYENV_ROOT:=$HOME/.pyenv}/bin/pyenv" ]]; then | ||
path=("${PYENV_ROOT}/bin" $path) | ||
|
@@ -22,7 +25,7 @@ elif (( $+commands[pyenv] )); then | |
else | ||
if [[ -n "$PYTHONUSERBASE" ]]; then | ||
path=($PYTHONUSERBASE/bin $path) | ||
elif [[ "$OSTYPE" == darwin* ]]; then | ||
elif is-darwin; then | ||
path=($HOME/Library/Python/*/bin(N) $path) | ||
else | ||
# This is subject to change. | ||
|
@@ -68,7 +71,7 @@ function _python-workon-cwd { | |
if [[ "$ENV_NAME" != "" ]]; then | ||
# Activate the environment only if it is not already active | ||
if [[ "$VIRTUAL_ENV" != "$WORKON_HOME/$ENV_NAME" ]]; then | ||
if [[ -e "$WORKON_HOME/$ENV_NAME/bin/activate" ]]; then | ||
if [[ -n "$WORKON_HOME" && -e "$WORKON_HOME/$ENV_NAME/bin/activate" ]]; then | ||
workon "$ENV_NAME" && export CD_VIRTUAL_ENV="$ENV_NAME" | ||
elif [[ -e "$ENV_NAME/bin/activate" ]]; then | ||
source $ENV_NAME/bin/activate && export CD_VIRTUAL_ENV="$ENV_NAME" | ||
|
@@ -144,26 +147,35 @@ if (( $+VIRTUALENVWRAPPER_VIRTUALENV || $+commands[virtualenv] )) && \ | |
fi | ||
|
||
# Load PIP completion. | ||
if (( $#commands[(i)pip(|[23])] )); then | ||
cache_file="${TMPDIR:-/tmp}/prezto-pip-cache.$UID.zsh" | ||
|
||
# Detect and use one available from among 'pip', 'pip2', 'pip3' variants | ||
# Detect and use one available from among 'pip', 'pip2', 'pip3' variants | ||
if [[ -n "$PYENV_ROOT" ]]; then | ||
for pip in pip{,2,3}; do | ||
pip_command="$(pyenv which "$pip" 2>/dev/null)" | ||
[[ -n "$pip_command" ]] && break | ||
done | ||
unset pip | ||
else | ||
pip_command="$commands[(i)pip(|[23])]" | ||
fi | ||
if [[ -n "$pip_command" ]]; then | ||
cache_file="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/pip-cache.zsh" | ||
|
||
if [[ "$pip_command" -nt "$cache_file" \ | ||
|| "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" \ | ||
|| ! -s "$cache_file" ]]; then | ||
mkdir -p "$cache_file:h" | ||
# pip is slow; cache its output. And also support 'pip2', 'pip3' variants | ||
$pip_command completion --zsh \ | ||
"$pip_command" completion --zsh \ | ||
| sed -e "s/\(compctl -K [-_[:alnum:]]* pip\).*/\1{,2,3}{,.{0..9}}/" \ | ||
>! "$cache_file" \ | ||
2> /dev/null | ||
fi | ||
|
||
source "$cache_file" | ||
|
||
unset cache_file pip_command | ||
unset cache_file | ||
fi | ||
unset pip_command | ||
|
||
# Load conda into the shell session, if requested | ||
zstyle -T ':prezto:module:python' conda-init | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.