-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Bash helpers don't work on MacOS #3289
Comments
I've kind of given up on picking the right file. I'd like to emit some generated code and tell people to append it themselves. Sure, would be great to get some more detailed instructions for git+Mac. |
|
Hah, no worries... I agree that it's confusing, and might be best to just let people configure their profiles themselves. I'll try to figure out what's going on with the Git function. |
I'm using Drush 8.1.15 on MacOS High Sierra. Well, technically I'm using Drush Launcher but I've run
drush init
from within a Composer project using Drush 8.1.15. I've also attempted this with 9.0.0-rc1 and the behavior is the same.Drush init tries to install a bunch of helpers (Bash prompt and completion customizations), but these are broken on a Mac, for at least two reasons.
First, it appends file includes to
.bashrc
, which is fine for Linux environments, but doesn't work on Mac. Mac terminals are login shells by default, so they don't source.bashrc
. These includes should instead be added to.bash_profile
. A good example of the right switching logic to use here might be BLT: https://github.com/acquia/blt/blob/9.1.x/src/Robo/Commands/Blt/AliasCommand.phpSecond, even if you add the correct includes to
.bash_profile
, the custom Git/Drush prompt doesn't work. The problem is that the__git_ps1
function doesn't exist out of the box with recent versions of Git on Mac. Not sure if that's a recent change, or different from Linux, or what. If you manually download and source git-prompt.sh (as described here) it works fine. Seems like we should document that if it's the recommended workflow.The text was updated successfully, but these errors were encountered: