edc / bass

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

"At the moment, Bass does not work with interactive utilities." #14

Closed shawnbon206 closed 7 years ago

shawnbon206 commented 8 years ago

I wish to compile android using fish, the only thing stopping me is envsetup.sh, which has some interactive parts.

ghost commented 8 years ago

@shawnbon206 Were you able to figure something out?

zaclimon commented 8 years ago

If somebody is interested I've made a bash script in which it is possible to compile Android with Fish.

Here's the link:

https://github.com/zaclimon/Personnal-Stuff/blob/master/scripts/apbs

Don't hesitate if you have some potential ideas for it.

ghost commented 8 years ago

@zaclimon Looks terrific! Good job :)

mnewt commented 7 years ago

I run bash scripts that prompt for information. One example is when I log in, I have a script (sourced using bass) that starts ssh-agent and runs ssh-add. ssh-add prompts for my password. The script prints out during execution and prompts successfully. Everything works great in this scenario.

This seems to indicate that bass does work with interactive utilities. Was functionality added or is that not what you're referring to?

zaclimon commented 7 years ago

It does work with some utilities as your case doesn't show any problems.

However, the Android build script (envsetup.sh) is kinda a sneaky one. I don't know how to say it as I might be wrong in terminologies but from what I see, it does depend on some Bash specific stuff in order to work. (It also has some difficulties with other shells like zsh if I remember correctly)

In this regard, it is not something that native Fish nor Bass can do yet. (Which is the reason I made the script specified above)

shawnbon206 commented 7 years ago

I closed this issue, zaclimon ported the build script and I'm not using bass anymore. But this issue was mentioned in the bass README.md so someone may want to reopen it later if they come up with a more constructive example of this issue.

edc commented 7 years ago

I've updated the README to make it clearer that Bass may or may not work with interactive utilities. It depends on how the utility is written. Typically if the utility writes its prompt to stderr, it should work; if it writes to stdout, the prompt is eaten by Bass and it will be weird.