bug-cvs
[Top][All Lists]
Advanced

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

Re: CVS documentation wrong: .bashrc not read


From: Derek Robert Price
Subject: Re: CVS documentation wrong: .bashrc not read
Date: Mon, 23 Jun 2003 10:10:37 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02

Hans Meine wrote:

Sadly, bash does not seem to have ANY dotfile which is read for non-interactive, non-login-shells.(!)

Hrm.  Your comment seems to agree with my documentation for Bash:

Invoked non-interactively
.........................

   When Bash is started non-interactively, to run a shell script, for
example, it looks for the variable `BASH_ENV' in the environment,
expands its value if it appears there, and uses the expanded value as
the name of a file to read and execute.  Bash behaves as if the
following command were executed:
     `if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi'

but the value of the `PATH' variable is not used to search for the file
name.

   As noted above, if a non-interactive shell is invoked with the
`--login' option, Bash attempts to read and execute commands from the
login shell startup files.


but setting:

   JUNKVAR=testval

in my ~/.bashrc and executing:

   ssh localhost 'echo $JUNKVAR'

outputs:

   testval

Like I would expect. It sounds like CVS's documentation is correct and Bash's is wrong. I've cc'd the bug-bash list.

If you really aren't having your .bashrc sourced, it could be because you are invoking Bash as `sh':

`--norc'
     Don't read the `~/.bashrc' initialization file in an interactive
     shell.  This is on by default if the shell is invoked as `sh'.


Derek

--
               *8^)

Email: address@hidden

Get CVS support at <http://ximbiot.com>!
--
160. I'm not a complete idiot - several parts are missing.






reply via email to

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