bug-bash
[Top][All Lists]
Advanced

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

"type" may return incorrect information after posix mode is enabled


From: Stephane Chazelas
Subject: "type" may return incorrect information after posix mode is enabled
Date: Tue, 21 Jul 2015 12:07:00 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

With the current git head (and 4.3):

$ ./bash -c 'eval() { echo function; }; set -o posix; type eval; eval echo not 
function'
eval is a function
eval ()
{
    echo function
}
not function
$ ./bash --version
GNU bash, version 4.4.0(1)-alpha (x86_64-unknown-linux-gnu)
[...]

"type eval" should return

eval is a shell builtin

there since the special builtin takes precedence over functions
in POSIX mode.

(actually, having "eval is a special shell builtin" like in
dash/mksh/ksh93/yash would be nice)

-- 
Stephane




reply via email to

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