mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-22 21:58:00 +00:00
parent
6e179f24ab
commit
2995b7d0c8
@ -20,7 +20,9 @@ fi
|
|||||||
#
|
#
|
||||||
|
|
||||||
cache_file="${TMPDIR:-/tmp}/prezto-fasd-cache.$UID.zsh"
|
cache_file="${TMPDIR:-/tmp}/prezto-fasd-cache.$UID.zsh"
|
||||||
if [[ "${commands[fasd]}" -nt "$cache_file" || ! -s "$cache_file" ]]; then
|
if [[ "${commands[fasd]}" -nt "$cache_file" \
|
||||||
|
|| "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" \
|
||||||
|
|| ! -s "$cache_file" ]]; then
|
||||||
# Set the base init arguments.
|
# Set the base init arguments.
|
||||||
init_args=(zsh-hook)
|
init_args=(zsh-hook)
|
||||||
|
|
||||||
|
@ -32,7 +32,9 @@ fi
|
|||||||
if (( $+commands[npm] )); then
|
if (( $+commands[npm] )); then
|
||||||
cache_file="${TMPDIR:-/tmp}/prezto-node-cache.$UID.zsh"
|
cache_file="${TMPDIR:-/tmp}/prezto-node-cache.$UID.zsh"
|
||||||
|
|
||||||
if [[ "$commands[npm]" -nt "$cache_file" || ! -s "$cache_file" ]]; then
|
if [[ "$commands[npm]" -nt "$cache_file" \
|
||||||
|
|| "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" \
|
||||||
|
|| ! -s "$cache_file" ]]; then
|
||||||
# npm is slow; cache its output.
|
# npm is slow; cache its output.
|
||||||
npm completion >! "$cache_file" 2> /dev/null
|
npm completion >! "$cache_file" 2> /dev/null
|
||||||
fi
|
fi
|
||||||
|
@ -43,7 +43,7 @@ if [[ "$OSTYPE" == darwin* ]]; then
|
|||||||
perl_path="$HOME/Library/Perl/5.12"
|
perl_path="$HOME/Library/Perl/5.12"
|
||||||
|
|
||||||
if [[ -f "$perl_path/lib/perl5/local/lib.pm" ]]; then
|
if [[ -f "$perl_path/lib/perl5/local/lib.pm" ]]; then
|
||||||
if [[ ! -s "$cache_file" ]]; then
|
if [[ "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" || ! -s "$cache_file" ]]; then
|
||||||
perl -I$perl_path/lib/perl5 -Mlocal::lib=$perl_path >! "$cache_file"
|
perl -I$perl_path/lib/perl5 -Mlocal::lib=$perl_path >! "$cache_file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -149,7 +149,9 @@ if (( $#commands[(i)pip(|[23])] )); then
|
|||||||
# Detect and use one available from among 'pip', 'pip2', 'pip3' variants
|
# Detect and use one available from among 'pip', 'pip2', 'pip3' variants
|
||||||
pip_command="$commands[(i)pip(|[23])]"
|
pip_command="$commands[(i)pip(|[23])]"
|
||||||
|
|
||||||
if [[ "$pip_command" -nt "$cache_file" || ! -s "$cache_file" ]]; then
|
if [[ "$pip_command" -nt "$cache_file" \
|
||||||
|
|| "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" \
|
||||||
|
|| ! -s "$cache_file" ]]; then
|
||||||
# pip is slow; cache its output. And also support 'pip2', 'pip3' variants
|
# 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|& pip2 pip3|" >! "$cache_file" 2> /dev/null
|
| sed -e "s|compctl -K [-_[:alnum:]]* pip|& pip2 pip3|" >! "$cache_file" 2> /dev/null
|
||||||
|
Loading…
Reference in New Issue
Block a user