bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Startup behaviour regarding files


From: Branden
Subject: Startup behaviour regarding files
Date: Tue, 20 Feb 2001 09:13:30 -0300

Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: cygwin
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='i686'
    -DCONF_OSTYPE='cygwin' -DCONF_MACHTYPE='i686-pc-cygwin'
    -DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H
    -I.  -I../src -I../src/include -I../src/lib -I/usr/include -g -O2
uname output: CYGWIN_98-4.10 WS-D3-0052 1.1.7(0.31/3/2)
    2000-12-25 12:39 i586 unknown
Machine Type: i686-pc-cygwin

Bash Version: 2.04
Patch Level: 5
Release Status: release

Description:
    There's something I believe is a bug in bash, regarding its startup
    files. When bash is started as an interactive login shell, it
    executes /etc/profile and ~/.bash_profile and ~/.bash_login, but it
    doesn't execute ~/.bashrc. When bash is started as an interactive
    shell, it executes only ~/.bashrc (and whatever it finds in the
    BASH_ENV variable). This is somewhat confuse for setting variables
    that shouldn't be exported but should be used in all bash interactive
    sessions, as PS1 and aliases. IIRC, RedHat Linux distribution does
    some work around it using a file such as /etc/bashrc that gets called
    by both /etc/profile and by the default ~/.bashrc. That file is
    then used to define variables like PS1 and aliases.

    Is this really the correct behaviour? Shouldn't bash execute ~/.bashrc
    on login scripts? I read tcsh manpage and I see tcsh calls ~/.cshrc
    for both login and not-login interactive shells.

    If this isn't a bug, what is the correct distribution of instructions
    between /etc/profile, ~/.bash_profile and ~/.bashrc ? (Please reply
    to my mail address.)

Repeat-By:
    N/A

Fix:
    Execute ~/.bashrc on login shells (???)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]