mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-14 09:50:08 +00:00
feat(yarn): add global bin directory to $PATH
(#9410)
Fixes #9177 Closes #9410
This commit is contained in:
parent
29b5c182be
commit
f0bbef1a07
1 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
# Add yarn bin directory to $PATH if it exists and not in $PATH already
|
||||||
|
bindir=$(yarn global bin 2>/dev/null) \
|
||||||
|
&& [[ -d "$bindir" ]] \
|
||||||
|
&& (( ! ${path[(Ie)$bindir]} )) \
|
||||||
|
&& path+=("$bindir")
|
||||||
|
unset bindir
|
||||||
|
|
||||||
alias y="yarn"
|
alias y="yarn"
|
||||||
alias ya="yarn add"
|
alias ya="yarn add"
|
||||||
alias yad="yarn add --dev"
|
alias yad="yarn add --dev"
|
||||||
|
|
Loading…
Reference in a new issue