0

I'm on a macOS system. My SHELL variable says /bin/bash, but I have Homebrew bash installed too.

I deleted my .bash_profile file, and my .bashrc only sets the PATH. But now every time I type Command+T to open a new tab in Terminal.app, something echoes the word foo just before I'm given my prompt. I grepped around in /etc and found nothing, but since this is a Mac things might just be arranged differently.

Is there a way to know which config files are being read in when I start up a shell? Where should I look?

AdminBee
  • 21,637
  • 21
  • 47
  • 71
Lucky
  • 129
  • 3
  • 1
    Linking in https://unix.stackexchange.com/q/334382/117549 – Jeff Schaller Sep 29 '21 at 20:14
  • LOL, the contents of my ~/.profile said "echo foo". Nevertheless, the question is still a valid one I think. – Lucky Sep 29 '21 at 20:25
  • 4
    Does this answer your question? [Find out what scripts are being run by bash on startup](https://unix.stackexchange.com/questions/334382/find-out-what-scripts-are-being-run-by-bash-on-startup) – Kusalananda Sep 29 '21 at 20:27
  • see [How to determine where an environment variable came from?](https://unix.stackexchange.com/q/813/170373) and [Which startup file is being used by my shell?](https://unix.stackexchange.com/q/367322/170373). You didn't ask about envvars, but that first one contains an answer that shows _everything_ the shell runs, file names included. – ilkkachu Sep 30 '21 at 08:40

0 Answers0