|
From: | Raphael Cohn |
Subject: | Re: Non-POSIX friendly output from declare -f / typeset -f |
Date: | Tue, 20 Jan 2015 16:03:28 +0000 |
On 1/20/15 9:09 AM, Raphael Cohn wrote:
> Hi,
>
> It seems with bash 4.3.30(1)-release (and probably others) that embedded
> functions are output with a leading 'function ' keyword when using declare
> -f / typeset -f. This is different to all other shells that support declare
> / typeset that I've tested (pdksh, mksh, Mac OS X ksh, which I think is AT&T)
There's no real compatibility here, since typeset isn't part of the Posix
standard. Most shells, including bash, are concerned primarily with being
able to parse their own output.
There will be a change in the next version of bash that omits the
`function' keyword in posix mode, but that doesn't really help you
if you have to use embedded function definitions now.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
[Prev in Thread] | Current Thread | [Next in Thread] |