1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-12 08:50:08 +00:00

feat(yarn): add global bin directory to $PATH (#9410)

Fixes #9177
Closes #9410
This commit is contained in:
Cxarli 2020-10-31 16:01:18 +01:00 committed by Marc Cornellà
parent 29b5c182be
commit f0bbef1a07
No known key found for this signature in database
GPG key ID: 0314585E776A9C1B

View file

@ -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 ya="yarn add"
alias yad="yarn add --dev"