On Tue, Jan 07 2020, Klemens Nanni wrote:
> On Tue, Jan 07, 2020 at 06:47:16PM +0100, Jeremie Courreges-Anglas wrote:
>> Bah, I think I understand why this was chosen. bash functions declared
>> with "function name" or "function name()" aren't special. Probably we
>> should do the same.
... the
On Tue, Jan 07, 2020 at 06:47:16PM +0100, Jeremie Courreges-Anglas wrote:
> Bah, I think I understand why this was chosen. bash functions declared
> with "function name" or "function name()" aren't special. Probably we
> should do the same. I'm postponing this for now, thanks for the
> feedback
On Sat, Dec 28 2019, Klemens Nanni wrote:
> On Sat, Dec 28, 2019 at 04:07:02PM +0100, Mark Kettenis wrote:
>> Are there other ksh implementations that have this "feature"?
> MirBSD's ksh allows all three forms but treats `function name()' like
> `name()', that is $0 stays the same and will not be
On Sat, Dec 28, 2019 at 10:08 AM Mark Kettenis wrote:
> [snip]
> Are there other ksh implementations that have this "feature"?
As for this question, I can at least confirm that no version of ksh93 has it.
On Sat, Dec 28, 2019 at 04:07:02PM +0100, Mark Kettenis wrote:
> Are there other ksh implementations that have this "feature"?
MirBSD's ksh allows all three forms but treats `function name()' like
`name()', that is $0 stays the same and will not be set to the funtion's
name:
$ echo $KSH_VE
On Sat, Dec 28, 2019 at 09:53:28AM -0500, Andras Farkas wrote:
> That said, I personally think to define a function with both
> 'function' and '()' is a genuine syntax error.
Right now it definitely is a syntax error, what that is what this diff
tries to fix ;-)
I think compatibility to other Bour
> From: Jeremie Courreges-Anglas
> Date: Sat, 28 Dec 2019 14:40:27 +0100
>
> We have a few ports (~12) patched because of shell script constructs
> like
>
> function usage()
> {
What is the #! for those scripts?
> which are rejected by our ksh. Indeed ksh only supports either
>
> usage
On Sat, Dec 28, 2019 at 02:40:27PM +0100, Jeremie Courreges-Anglas wrote:
> We have a few ports (~12) patched because of shell script constructs
> like
>
> function usage()
> {
>
> which are rejected by our ksh. Indeed ksh only supports either
>
> usage()
> {
>
> or
>
> function usa
If this diff gets accepted, in ksh's man page, you'll probably have to
change the following line as it's not entirely disambiguous how a
function would behave if it had both 'function' and '()' where it was
defined:
"Functions defined with the function reserved word are treated
differently in the f
We have a few ports (~12) patched because of shell script constructs
like
function usage()
{
which are rejected by our ksh. Indeed ksh only supports either
usage()
{
or
function usage
{
Both bash and zsh also allow an optional "()". The diff below
implements the missing bits.
10 matches
Mail list logo