DASH Shell discussions
 help / color / mirror / Atom feed
From: Heiko Gerstung <heiko@am-anger-1.de>
To: dash@vger.kernel.org
Subject: Re: Dashhh
Date: Thu, 17 Nov 2011 21:46:45 +0100	[thread overview]
Message-ID: <4EC572B5.8020907@am-anger-1.de> (raw)
In-Reply-To: <slrnjcaqkf.lrr.stephane.chazelas@spam.is.invalid>

Am 17.11.11 21:11, schrieb Stephane CHAZELAS:
> 2011-11-17, 17:17(+01), Heiko Gerstung:
> [...]
>> 1. The usual "[[" and "==" stuff (pretty easy to change, thank you sed)
>> 2. shift returns with a critical error when no arguments are left (no really good solution found)
> [ "$#" -eq 0 ] || shift
>
>> 3. $[] arithmetic stuff not working (OK, worked around that with bc)
> $((...))
>
>> 4. The bash FUNCNAME variable was very valuable for debugging purposes and is nonexistent in dash
>
> If your functions are written as
>
> f() {
>    ...
> }
>
> sed 's/^[[:blank:]]*\([^[:blank:]]*\)[[:blank:]]*()[[:blank:]]*{/&  local FUNCNAME=\1;/'
>
Thanks for your helpful comments, in fact I did something like this 
before I added the FUNCNAME patch to my dash sourcetree. I still prefer 
the FUNCNAME implementation as provided by my patch, but it is certainly 
possible to work around that as proposed by you.

Regards,
  Heiko


      parent reply	other threads:[~2011-11-17 20:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-17 16:17 Dashhh Heiko Gerstung
2011-11-17 17:21 ` Dashhh Stefano Lattarini
2011-11-17 20:07   ` Dashhh Heiko Gerstung
2011-11-18 10:50     ` Dashhh Stefano Lattarini
2011-11-17 17:56 ` Dashhh Eric Blake
2011-11-17 20:40   ` Dashhh Heiko Gerstung
2011-11-17 20:11 ` Dashhh Stephane CHAZELAS
2011-11-17 20:38   ` Dashhh Eric Blake
2011-11-18  8:18     ` Dashhh Stephane CHAZELAS
2011-11-17 20:46   ` Heiko Gerstung [this message]

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=4EC572B5.8020907@am-anger-1.de \
    --to=heiko@am-anger-1.de \
    --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