Re: How to list functions?

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

 



On 10/22/2013 01:05 PM, Alexander Huemer wrote:
> Hi,
> 
> posh has support for functions.

Wrong list.  posh is a different shell than dash, so there's nothing
this list can do to change posh.

> 
> $ f() { echo foo; }
> $ f
> foo
> $ 
> 
> Unfortunately I am unable to list the defined functions.
> I tried `typeset`, `declare` and `set` without success in posh 0.10.2 on 

posh tries hard to limit itself to POSIX (which does not yet define
'typeset', lacks 'declare', and where 'set' does not list function
bodies).  As far as I can see, POSIX doesn't require shells to be able
to output function bodies.  For posh to provide this, they'd have to
give you an extension beyond POSIX; but that goes against the goals of
posh.  Sorry.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux