0

While modifying .bash_profile in my MacBook using terminal, I may have made a mistake.

Right after saving the changes in .bash_profile whatever command I am trying to execute in terminal it responds with:

-bash: __git_ps1: command not found

As a result I can not reach to .bash_profile again to revert my changes. Any idea how to restore or resolve this problem?

  • 1
    You can use a non-terminal/GUI editor to change your bash_profile... or overwrite it with a good version. – xenoid Oct 30 '19 at 12:58
0

I found a the solutions from this StackOverflow thread.

  • Open the terminal.
  • Go to “File (or Shell) -> New Command.
  • Type open -e .bash_profile
  • Then hit run.
| improve this answer | |
  • Nice self-solved issue! But can you add a link to the StackOverflow thread that solved your issue. – Giacomo1968 Oct 30 '19 at 13:36
  • Solution found by this thread: stackoverflow.com/a/13081099/10037653 – mahadi hasan Oct 31 '19 at 13:17
  • Comments are not really the place for providing that info. I added it to your answer. That is where it should be added so all can read it. – Giacomo1968 Oct 31 '19 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.