oh-my-fish / plugin-foreign-env

Run foreign bash scripts and capture exported environment variables
MIT License
221 stars 15 forks source link

looks like sourcing doesn't work #17

Closed MurKit closed 5 years ago

MurKit commented 5 years ago

This works, help is displayed: fenv source ~/.nvm/nvm.sh \; nvm --help

But it isn't sourced still, because just nvm --help doesn't work.

derekstavis commented 5 years ago

fenv doesn't convert bash functions to fish ones. It just imports environment variables defined on bash to fish. To call any bash-defined function you need to escape ; and call right after the defining script. If your bash profile already sources nvm, you can use only fenv nvm --help.

Karrq commented 9 months ago

I found the same "issue" trying to source /etc/profile - on Arch a lot of profile scripts make use of append_path, but I'm unsure how I can expose this function for them using fenv...