I was playing around with setting additional paths within .bash_profile. To see what would happen I did: export PATH="/Users/neil/blah"
and purposefully did not include $PATH
on the end of it. Now of course my path is broken, so when I go into terminal it won't let me type anything.
Basically what I need to do is find a way to access my .bash_profile file to fix it in (finder preferably), all without using terminal.
Any suggestion on how I can find and modify this hidden file without using terminal?
Thanks in advance!
PATH
is only needed for lookups when you don't provide an absolute path. While
vi .bash_profile
might not work, because the shell doesn't know where vi
is, the following would:
/usr/bin/vi .bash_profile
(Assuming the vi
actually is in /usr/bin/
).
Manually type the path ~/.bash_profile into any text editor, or tell finder to show hidden files and navigate there. Also if terminal is having problems you should still be able to ctrl-c out of the messages and cd around the use vim to fix it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With