A few months ago, I made it easier to run scripts I'd written by creating a .bashrc file. It worked for a while, but it has not worked in a few weeks. As the Terminal snippet below shows, the file apparently does not run when Terminal is launched. I haven't changed anything that should affect this. Is there a Terminal preference that non-intuitively has this effect? Does use of 'homebrew' override?

MBP-WWG:~ Admin$ echo $PATH
MBP-WWG:~ Admin$ ls -late@ .bashrc
-rwxr-xr-x  1 Admin  staff  45 Jul 29 14:35 .bashrc
MBP-WWG:~ Admin$ cat !$
cat .bashrc

export PATH=~/bin:$PATH
export $path=$PATH

MBP-WWG:~ Admin$ echo $SHELL
MBP-WWG:~ Admin$ echo $path

MBP-WWG:~ Admin$ 
  • You should be using .bash_profile Also see: unix.stackexchange.com/questions/119627/… – Allan Aug 23 '17 at 11:24
  • Well, that detailed discussion tells how to get around the problem, but doesn't explain why it worked for a little while and than quit. – WGroleau Aug 23 '17 at 11:33
  • 1
    Terminal.app > Preferences>Profiles>Shell>Startup>Run command could cause bashrc to be read. I suggest you read the bash manual under the heading INVOCATION. BTW, where did you define $path? – fd0 Aug 23 '17 at 11:57
  • export $path= was an error; should have been export path= – WGroleau Aug 23 '17 at 12:44
  • The "run comand" was off, and I had never changed it (until now). The command was blnk but when I checked the box, it was auto-filled with "-bash" Since the other method already got things working, I turned this off again. I use MacOS man pages but I don't trust them. I've already found some copied from other unixes without having Apple's changes edited in. – WGroleau Aug 23 '17 at 12:49

You must log in to answer this question.

Browse other questions tagged .