New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #24003 (closed defect: invalid)

Opened 2 years ago

Last modified 2 years ago

Customizing bash 4.x

Reported by: slferris2@… Owned by: raimue@…
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: Cc:
Port: bash

Description

I recently downloaded and installed bash 4 using MacPorts. However, I want to use the shell customizations I have long been using with bash 3 located in /etc/bashrc. Bash 4 doesn't seem to find this file, but otherwise seems to work normally. Is there some path or other variable I need to set to make this happen?

Thanks

Change History

Changed 2 years ago by macsforever2000@…

  • owner changed from macports-tickets@… to raimue@…
  • keywords bash customization bashrc removed
  • port changed from bash 4.0.37_0 to bash

Changed 2 years ago by raimue@…

  • status changed from new to closed
  • resolution set to invalid

bash first reads /etc/profile (which sources /etc/bashrc) and then ~/.bash_profile, but only if it is run as a login shell (called with argv[0] == "-bash" or explicitely requested by bash --login). Interactive shells only source ~/.bashrc automatically. See the section INVOCATION in the bash man page for more details.

This behavior did not change between bash 3 and 4. Probably bash isn't run as login shell any more in your case and therefore the file /etc/bashrc is not being read.

Note: See TracTickets for help on using tickets.