shoestrap/assets/default/fish/init/paths.fish

77 lines
2.0 KiB
Fish
Raw Normal View History

2015-06-05 19:16:12 +00:00
set det_os "unknown"
switch (uname)
case "Darwin"
set det_os "mac"
case "Linux"
set det_os "linux"
case '*'
set det_os "unknown"
end
# opt directory
2016-02-04 18:33:08 +00:00
if [ -d /opt/local ]
set -gx PATH /opt/local/bin /opt/local/sbin $PATH
end
2015-06-13 00:34:49 +00:00
if [ $det_os = "linux" ]
2015-06-05 19:16:12 +00:00
set android_sdk $HOME/workspace/adt-bundle-linux/sdk
2015-06-13 00:34:49 +00:00
else if [ $det_os = "mac" ]
2015-06-05 19:16:12 +00:00
set android_sdk $HOME/workspace/android-sdk-macosx
2015-06-13 00:34:49 +00:00
# Fix Python path on OSX to avoid considering System extras over newer versions
2019-10-29 01:15:00 +00:00
# Local
set -gx PATH $HOME/Library/Python/3.7/bin $HOME/Library/Python/2.7/bin $PATH
# set -gx PYTHONPATH $HOME/Library/Python/2.7/lib/python/site-packages:$PYTHONPATH
2019-10-29 01:15:00 +00:00
# Macports
2017-11-16 18:22:02 +00:00
set -gx PATH $PATH /opt/local/Library/Frameworks/Python.framework/Versions/Current/bin
2019-10-29 01:15:00 +00:00
# set -gx PYTHONPATH /opt/local/Library/Frameworks/Python.framework/Versions/Current/lib $PYTHONPATH
# set -gx PYTHONPATH /opt/local/Library/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages /Library/Python/2.7/site-packages $PYTHONPATH
2015-06-05 19:16:12 +00:00
end
2019-10-29 01:15:40 +00:00
# NPM paths
if type -q npm
2020-02-21 18:57:11 +00:00
set npm_path "$HOME/.npm/bin"
if [ ! -d "$npm_path" ]
# It's more robust to use the subshell, but far slower
set npm_path (npm bin -g 2> /dev/null)
end
2019-11-09 20:35:17 +00:00
if [ -d "$npm_path" ]
2020-02-21 18:57:11 +00:00
set -gx PATH $PATH $npm_path
2019-11-09 20:35:17 +00:00
end
2019-10-29 01:15:40 +00:00
end
# Add rust path
2018-08-04 02:14:41 +00:00
if [ -d "$HOME/.cargo/bin" ]
set -gx PATH $HOME/.cargo/bin $PATH
end
2018-08-04 02:14:41 +00:00
# Golang paths
set -gx GOPATH $HOME/workspace/go_path
2017-07-25 21:03:44 +00:00
if [ -d "$GOPATH" ]
2018-08-04 02:20:16 +00:00
set -gx PATH $GOPATH/bin $PATH
end
2015-08-26 21:29:51 +00:00
2016-02-04 18:33:08 +00:00
# Android paths
if [ -d "$android_sdk" ]
set -gx ANDROID_HOME $android_sdk
set -gx PATH $PATH $android_sdk/platform-tools $android_sdk/tools
end
2015-06-05 19:16:12 +00:00
2017-11-16 18:22:02 +00:00
# Ruby paths
2019-06-12 18:06:33 +00:00
if type -q rbenv ; and status --is-interactive
2020-10-23 18:45:44 +00:00
set -gx PATH $PATH $HOME/.rbenv/shims
2019-06-12 18:06:33 +00:00
else if [ -d "$HOME/.rvm" ]
2017-11-16 18:22:02 +00:00
set -gx PATH $PATH $HOME/.rvm/bin
2019-06-12 18:06:33 +00:00
source "$HOME/.rvm/scripts/extras/rvm.fish"
2017-11-16 18:22:02 +00:00
end
2018-08-04 02:14:41 +00:00
# Home paths
if [ -d "$HOME/.local/bin" ]
set -gx PATH $HOME/.local/bin $PATH
end
2020-02-21 18:57:11 +00:00
2018-08-04 02:14:41 +00:00
if [ -d "$HOME/bin" ]
set -gx PATH $HOME/bin $PATH
end