Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
f6a03b23
Commit
f6a03b23
authored
Mar 06, 2018
by
Michael Stucki
Committed by
Marc Cornellà
May 11, 2020
Browse files
composer: use cache to fix slowness during startup
Fixes #6647 Closes #6664
parent
da8c19a0
Changes
1
Show whitespace changes
Inline
Side-by-side
plugins/composer/composer.plugin.zsh
View file @
f6a03b23
...
@@ -49,7 +49,17 @@ alias cget='curl -s https://getcomposer.org/installer | php'
...
@@ -49,7 +49,17 @@ alias cget='curl -s https://getcomposer.org/installer | php'
# Add Composer's global binaries to PATH, using Composer if available.
# Add Composer's global binaries to PATH, using Composer if available.
if
((
$+
commands[composer]
))
;
then
if
((
$+
commands[composer]
))
;
then
export
PATH
=
$PATH
:
$(
composer global config bin-dir
--absolute
2>/dev/null
)
_retrieve_cache composer
if
[[
-z
$__composer_bin_dir
]]
;
then
__composer_bin_dir
=
$(
composer global config bin-dir
--absolute
2>/dev/null
)
_store_cache composer __composer_bin_dir
fi
# Add Composer's global binaries to PATH
export
PATH
=
"
$PATH
:
$__composer_bin_dir
"
unset
__composer_bin_dir
else
else
[
-d
$HOME
/.composer/vendor/bin
]
&&
export
PATH
=
$PATH
:
$HOME
/.composer/vendor/bin
[
-d
$HOME
/.composer/vendor/bin
]
&&
export
PATH
=
$PATH
:
$HOME
/.composer/vendor/bin
[
-d
$HOME
/.config/composer/vendor/bin
]
&&
export
PATH
=
$PATH
:
$HOME
/.config/composer/vendor/bin
[
-d
$HOME
/.config/composer/vendor/bin
]
&&
export
PATH
=
$PATH
:
$HOME
/.config/composer/vendor/bin
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment