edc / bass

Make Bash utilities usable in Fish shell
MIT License
2.2k stars 70 forks source link

Functions are not available in shell when run in source #54

Closed ZNackasha-intrepid closed 6 years ago

ZNackasha-intrepid commented 6 years ago

My current project requiters me to compile android. to accomplish this I will need to run the following command.

source envsetup.sh

The envsetup.sh file can be retrieved from the platform build repo

once this command is ran multiple functions defined in the shell scrip should become available to the user in the shell. this include the mmm function

running the following should achieve the same thing. but i understand why it does not.

bass source envsetup.sh

I tried running

source bass source envsetup.sh

but i get the following error

source: Error encountered while sourcing file "bass":
source: No such file or directory

Is there a way around this,?

edc commented 6 years ago

@ZNackasha-intrepid Have you tried bass source envsetup.sh ';' mmm? This is how we get nvm to work with Bass. If it works, then you can create a fish function to invoke that so you don't have to type that long command.

> funced mmm
mmm> function mmm
           bass source envsetup.sh ';' mmm
       end