bug-bash
[Top][All Lists]
Advanced

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

Re: Non-POSIX friendly output from declare -f / typeset -f


From: Raphael Cohn
Subject: Re: Non-POSIX friendly output from declare -f / typeset -f
Date: Tue, 20 Jan 2015 16:03:28 +0000

Chet,

Thank you. I'll look at a regex hack-up...

Raph

On 20 January 2015 at 15:58, Chet Ramey <address@hidden> wrote:
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    address@hidden    http://cnswww.cns.cwru.edu/~chet/


reply via email to

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