Opened 15 years ago

Closed 15 years ago

#24003 closed defect (invalid)

Customizing bash 4.x

Reported by: slferris2@… Owned by: raimue (Rainer Müller)
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 (2)

comment:1 Changed 15 years ago by mf2k (Frank Schima)

Keywords: bash customization bashrc removed
Owner: changed from macports-tickets@… to raimue@…
Port: 4.0.37_0 removed

comment:2 Changed 15 years ago by raimue (Rainer Müller)

Resolution: invalid
Status: newclosed

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.