Gerhard Brauer wrote:

> Bash Version: 4.0
> Patch Level: 24
> Release Status: release
> Could you CC me please as I'm not on the list. Thanks.
> And sorry for bad english...
> Description:
>         If i source a file relative to the current directory then - if
> in sh mode - sourcing fails with file not found. If i source a file with
> absolute or relative path than it works in sh mode. In bash mode i have
> no problem.

This is a property of bash posix mode when you don't have `.' in $PATH:

 28. The `.' and `source' builtins do not search the current directory
     for the filename argument if it is not found by searching `PATH'.

> This behavior is new in version 4, old version 3.2 works fine.

The bash-3.2 behavior was a bug.  Its fix is listed in CHANGES:

ggg. Fixed a bug that caused a shell running in Posix mode to search $PWD for
     a file specified as an argument to source/. when the file was not found
     in $PATH.

``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU

Reply via email to