-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use an interactive shell to run .fpp.sh #138
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks! |
This conveniently executes all the appropriate rc files for both zsh and bash, thus expanding out aliases. There are cons to this approach though: * Though the Bash documentation strongly suggests that expand_aliases is turned on when interactive, I was not able to reproduce this behavior on Yosemite bash. (It's possible Yosemite just comes with a weird setup though.) * $SHELL only ever expands out to the user's default shell and not the current shell. (So in the rare case where you might open up zsh, then run bash, and then use fpp, fpp will choose zsh and not bash.) * Not all shells support the -i flag. However, the two shells currently supported by fpp (zsh and bash) do indeed have this handy dandy flag. A controversial change, perhaps! My feelings would not be hurt if you guys chose to not accept this PR, but my heart would be ecstatic if you did. This fixes issue facebook#125.
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Hey @hlian! Thanks for the PR -- I remember interactive mode coming up when I was figuring out alias expansion but I think I got stuck on a similar issue you had -- yosemite needing I guess checking for the existence of shopt and then flipping the flag isn't the worst solution, but it does seem a little blunt (compared to sourcing). Let me pull this down and test locally -- I might actually prefer this though since sometimes sourcing bashrc's can have pretty aggressive side effects (I personally have a script to login automatically to my facebook dev server if a given flag is present, so that always trips me up when using fpp with bash sourcing) |
Use an interactive shell to run .fpp.sh
Definitely cleaner than my attempt #59. Yeah, (P.S. My hack to get |
This fixes issue #125.