1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-07-01 19:49:25 +00:00

feat(helper): add os-type helper functions

Add the following functions:

- is-darwin
- is-linux
- is-bsd
- is-cygwin

And apply them everywhere I found code doing that what these functions do.
This commit is contained in:
Kaspar Vollenweider
2020-02-13 09:56:29 +01:00
committed by Kaleb Elwert
parent 1b99be879c
commit f4ca9ebfc9
9 changed files with 30 additions and 10 deletions

View File

@ -11,7 +11,7 @@ if (( ! $+commands[ghc] )); then
fi
# Prepend Cabal per user directories to PATH.
if [[ "$OSTYPE" == darwin* && -d $HOME/Library/Haskell ]]; then
if is-darwin && [[ -d $HOME/Library/Haskell ]]; then
path=($HOME/Library/Haskell/bin(/N) $path)
else
path=($HOME/.cabal/bin(/N) $path)