dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Alexander Huemer <alexander.huemer@xx.vu>, dash@vger.kernel.org
Subject: Re: How to list functions?
Date: Tue, 22 Oct 2013 14:50:02 +0100	[thread overview]
Message-ID: <5266828A.7060505@redhat.com> (raw)
In-Reply-To: <20131022120556.GD12206@yade.xx.vu>

[-- Attachment #1: Type: text/plain, Size: 903 bytes --]

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 (harder than dash), and POSIX
does not yet define 'typeset', lacks 'declare', and does not require
'set' to list function bodies.  Thus, 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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

  reply	other threads:[~2013-10-22 14:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-22 12:05 How to list functions? Alexander Huemer
2013-10-22 13:50 ` Eric Blake [this message]
2013-10-22 13:56 ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5266828A.7060505@redhat.com \
    --to=eblake@redhat.com \
    --cc=alexander.huemer@xx.vu \
    --cc=dash@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).