zsh-users
 help / color / mirror / code / Atom feed
* [Zsh bug] function define bug
@ 2015-11-25  3:46 Ngô Huy
  2015-11-25  4:06 ` Matthew Martin
  0 siblings, 1 reply; 12+ messages in thread
From: Ngô Huy @ 2015-11-25  3:46 UTC (permalink / raw)
  To: zsh-users

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

Dear folks,

I found the problem in zsh define function. Demo

ls test() { echo "Bug !!!"} && ls && test

it will print

Bug !!!
Bug !!!

We should patch this behavior or it will break user case without quote
string. Workaround is always quoted strings after commands.

Kind regards,
Severus

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Zsh bug] function define bug
  2015-11-25  3:46 [Zsh bug] function define bug Ngô Huy
@ 2015-11-25  4:06 ` Matthew Martin
  2015-11-25  4:20   ` Ngô Huy
  0 siblings, 1 reply; 12+ messages in thread
From: Matthew Martin @ 2015-11-25  4:06 UTC (permalink / raw)
  To: Ngô Huy; +Cc: Zsh Users

On Tue, Nov 24, 2015 at 9:46 PM, Ngô Huy <huynhok.uit@vnoss.org> wrote:
> Dear folks,
>
> I found the problem in zsh define function. Demo
>
> ls test() { echo "Bug !!!"} && ls && test
>
> it will print
>
> Bug !!!
> Bug !!!


That's expected behaviour. Since MULTI_FUNC_DEF is set by default in zsh
mode, both ls and test are being defined as functions with the body
echo "Bug !!!".

% func1 func2 () { echo This is "$0"; }
% func1; func2
This is func1
This is func2
% which func{1,2}
func1 () {
        echo This is "$0"
}
func2 () {
        echo This is "$0"
}
% unsetopt MULTI_FUNC_DEF
% func1 func2 () { echo This is "$0"; }
zsh: parse error near `()'


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Zsh bug] function define bug
  2015-11-25  4:06 ` Matthew Martin
@ 2015-11-25  4:20   ` Ngô Huy
  2015-11-25  8:49     ` Cuong Manh Le
  0 siblings, 1 reply; 12+ messages in thread
From: Ngô Huy @ 2015-11-25  4:20 UTC (permalink / raw)
  To: Matthew Martin; +Cc: Zsh Users

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

Dear Matthew

2015-11-25 11:06 GMT+07:00 Matthew Martin <phy1729@gmail.com>:

> On Tue, Nov 24, 2015 at 9:46 PM, Ngô Huy <huynhok.uit@vnoss.org> wrote:
> > Dear folks,
> >
> > I found the problem in zsh define function. Demo
> >
> > ls test() { echo "Bug !!!"} && ls && test
> >
> > it will print
> >
> > Bug !!!
> > Bug !!!
>
>
> That's expected behaviour. Since MULTI_FUNC_DEF is set by default in zsh
> mode, both ls and test are being defined as functions with the body
> echo "Bug !!!".
>
> % func1 func2 () { echo This is "$0"; }
> % func1; func2
> This is func1
> This is func2
> % which func{1,2}
> func1 () {
>         echo This is "$0"
> }
> func2 () {
>         echo This is "$0"
> }
> % unsetopt MULTI_FUNC_DEF
> % func1 func2 () { echo This is "$0"; }
> zsh: parse error near `()'
>

I know this behavior likes advanced programming language but multì_func_def
should be turned off by default, it leads to risky problem when someone
searchs as grep, ls malicious strings without quote


Kind regards,
Severus

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Zsh bug] function define bug
  2015-11-25  4:20   ` Ngô Huy
@ 2015-11-25  8:49     ` Cuong Manh Le
  2015-11-25  9:03       ` Ngô Huy
  0 siblings, 1 reply; 12+ messages in thread
From: Cuong Manh Le @ 2015-11-25  8:49 UTC (permalink / raw)
  To: Ngô Huy; +Cc: Matthew Martin, Zsh Users

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

Hi Severus,

Can you give a demo?

You can turn off `multì_func_def` but you can always do multiple function
definition with reserved word `function`

Best.

On Wed, Nov 25, 2015 at 11:20 AM, Ngô Huy <huynhok.uit@vnoss.org> wrote:

> Dear Matthew
>
> 2015-11-25 11:06 GMT+07:00 Matthew Martin <phy1729@gmail.com>:
>
> > On Tue, Nov 24, 2015 at 9:46 PM, Ngô Huy <huynhok.uit@vnoss.org> wrote:
> > > Dear folks,
> > >
> > > I found the problem in zsh define function. Demo
> > >
> > > ls test() { echo "Bug !!!"} && ls && test
> > >
> > > it will print
> > >
> > > Bug !!!
> > > Bug !!!
> >
> >
> > That's expected behaviour. Since MULTI_FUNC_DEF is set by default in zsh
> > mode, both ls and test are being defined as functions with the body
> > echo "Bug !!!".
> >
> > % func1 func2 () { echo This is "$0"; }
> > % func1; func2
> > This is func1
> > This is func2
> > % which func{1,2}
> > func1 () {
> >         echo This is "$0"
> > }
> > func2 () {
> >         echo This is "$0"
> > }
> > % unsetopt MULTI_FUNC_DEF
> > % func1 func2 () { echo This is "$0"; }
> > zsh: parse error near `()'
> >
>
> I know this behavior likes advanced programming language but multì_func_def
> should be turned off by default, it leads to risky problem when someone
> searchs as grep, ls malicious strings without quote
>
>
> Kind regards,
> Severus
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Zsh bug] function define bug
  2015-11-25  8:49     ` Cuong Manh Le
@ 2015-11-25  9:03       ` Ngô Huy
  2015-11-25  9:04         ` Ngô Huy
  2015-11-25  9:20         ` Cuong Manh Le
  0 siblings, 2 replies; 12+ messages in thread
From: Ngô Huy @ 2015-11-25  9:03 UTC (permalink / raw)
  To: Cuong Manh Le; +Cc: Matthew Martin, Zsh Users

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

Dear Cuong,

2015-11-25 15:49 GMT+07:00 Cuong Manh Le <cuong.manhle.vn@gmail.com>:

> Hi Severus,
>
> Can you give a demo?
>
> You can turn off `multì_func_def` but you can always do multiple function
> definition with reserved word `function`
>
> Best.
>
>
> On Wed, Nov 25, 2015 at 11:20 AM, Ngô Huy <huynhok.uit@vnoss.org> wrote:
>
>> Dear Matthew
>>
>> 2015-11-25 11:06 GMT+07:00 Matthew Martin <phy1729@gmail.com>:
>>
>> > On Tue, Nov 24, 2015 at 9:46 PM, Ngô Huy <huynhok.uit@vnoss.org> wrote:
>> > > Dear folks,
>> > >
>> > > I found the problem in zsh define function. Demo
>> > >
>> > > ls test() { echo "Bug !!!"} && ls && test
>> > >
>> > > it will print
>> > >
>> > > Bug !!!
>> > > Bug !!!
>> >
>> >
>> > That's expected behaviour. Since MULTI_FUNC_DEF is set by default in zsh
>> > mode, both ls and test are being defined as functions with the body
>> > echo "Bug !!!".
>> >
>> > % func1 func2 () { echo This is "$0"; }
>> > % func1; func2
>> > This is func1
>> > This is func2
>> > % which func{1,2}
>> > func1 () {
>> >         echo This is "$0"
>> > }
>> > func2 () {
>> >         echo This is "$0"
>> > }
>> > % unsetopt MULTI_FUNC_DEF
>> > % func1 func2 () { echo This is "$0"; }
>> > zsh: parse error near `()'
>> >
>>
>> I know this behavior likes advanced programming language but
>> multì_func_def
>> should be turned off by default, it leads to risky problem when someone
>> searchs as grep, ls malicious strings without quote
>>
>>
>> Kind regards,
>> Severus
>>
>
> this's just example: cat file | grep foobar(){ rm -rf *}
grep wil execute rest of body

Kind regards,
Severus

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Zsh bug] function define bug
  2015-11-25  9:03       ` Ngô Huy
@ 2015-11-25  9:04         ` Ngô Huy
  2015-11-25  9:16           ` Christoph (Stucki) von Stuckrad
  2015-11-25  9:20         ` Cuong Manh Le
  1 sibling, 1 reply; 12+ messages in thread
From: Ngô Huy @ 2015-11-25  9:04 UTC (permalink / raw)
  To: Cuong Manh Le; +Cc: Matthew Martin, Zsh Users

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

Dear all,


2015-11-25 16:03 GMT+07:00 Ngô Huy <huynhok.uit@vnoss.org>:

> Dear Cuong,
>
> 2015-11-25 15:49 GMT+07:00 Cuong Manh Le <cuong.manhle.vn@gmail.com>:
>
>> Hi Severus,
>>
>> Can you give a demo?
>>
>> You can turn off `multì_func_def` but you can always do multiple function
>> definition with reserved word `function`
>>
>> Best.
>>
>>
>> On Wed, Nov 25, 2015 at 11:20 AM, Ngô Huy <huynhok.uit@vnoss.org> wrote:
>>
>>> Dear Matthew
>>>
>>> 2015-11-25 11:06 GMT+07:00 Matthew Martin <phy1729@gmail.com>:
>>>
>>> > On Tue, Nov 24, 2015 at 9:46 PM, Ngô Huy <huynhok.uit@vnoss.org>
>>> wrote:
>>> > > Dear folks,
>>> > >
>>> > > I found the problem in zsh define function. Demo
>>> > >
>>> > > ls test() { echo "Bug !!!"} && ls && test
>>> > >
>>> > > it will print
>>> > >
>>> > > Bug !!!
>>> > > Bug !!!
>>> >
>>> >
>>> > That's expected behaviour. Since MULTI_FUNC_DEF is set by default in
>>> zsh
>>> > mode, both ls and test are being defined as functions with the body
>>> > echo "Bug !!!".
>>> >
>>> > % func1 func2 () { echo This is "$0"; }
>>> > % func1; func2
>>> > This is func1
>>> > This is func2
>>> > % which func{1,2}
>>> > func1 () {
>>> >         echo This is "$0"
>>> > }
>>> > func2 () {
>>> >         echo This is "$0"
>>> > }
>>> > % unsetopt MULTI_FUNC_DEF
>>> > % func1 func2 () { echo This is "$0"; }
>>> > zsh: parse error near `()'
>>> >
>>>
>>> I know this behavior likes advanced programming language but
>>> multì_func_def
>>> should be turned off by default, it leads to risky problem when someone
>>> searchs as grep, ls malicious strings without quote
>>>
>>>
>>> Kind regards,
>>> Severus
>>>
>>
>> this's just example: cat file | grep foobar(){ rm -rf *}
> grep wil execute rest of body
>
> Kind regards,
> Severus
>
I don't see reason for multiple functions have same body but different
name. Let's me know if I'm wrong :)

Kind regards,
Severus

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Zsh bug] function define bug
  2015-11-25  9:04         ` Ngô Huy
@ 2015-11-25  9:16           ` Christoph (Stucki) von Stuckrad
  0 siblings, 0 replies; 12+ messages in thread
From: Christoph (Stucki) von Stuckrad @ 2015-11-25  9:16 UTC (permalink / raw)
  To: zsh-users

On Wed, 25 Nov 2015, Ngô Huy wrote:

> I don't see reason for multiple functions have same body but different
> name. Let's me know if I'm wrong :)

There are some programs, which do different things, if called by
different names (mostly links or symlinks to the same binary).

So to 'wrap' such a beast you'd need to wrap lost of names to
the same function, which inside it would call something like
{ command $0 "$@" }

This is the only case I ever used somethng like
lots of different names at onece real_name() {
        wrapper contents
}
to define all the things at once.

Stucki

-- 
Christoph von Stuckrad      * * |nickname |Mail <stucki@mi.fu-berlin.de> \
Freie Universitaet Berlin   |/_*|'stucki' |Tel(Mo.,Mi.):+49 30 838-75 459|
Mathematik & Informatik EDV |\ *|if online|  (Di,Do,Fr):+49 30 77 39 6600|
Takustr. 9 / 14195 Berlin   * * |on IRCnet|Fax(home):   +49 30 77 39 6601/


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Zsh bug] function define bug
  2015-11-25  9:03       ` Ngô Huy
  2015-11-25  9:04         ` Ngô Huy
@ 2015-11-25  9:20         ` Cuong Manh Le
  2015-11-25  9:39           ` Ngô Huy
  1 sibling, 1 reply; 12+ messages in thread
From: Cuong Manh Le @ 2015-11-25  9:20 UTC (permalink / raw)
  To: Ngô Huy; +Cc: Matthew Martin, Zsh Users

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

Hi Huy,

It's a good point, but in the user perspective, turn off `multifuncdef` is
not much useful:

$ unsetopt multifuncdef
$ echo 1 | grep foobar(){ echo 1; }
zsh: parse error near `()'

You still stuck and can not use `grep`.

The right way to use it from the beginning is quote the grep string pattern
if it contains any shell meta characters.

Also in zsh documentation
http://zsh.sourceforge.net/Doc/Release/Options.html#index-MULTIFUNCDEF , it
said that:

Multiple function definitions are not often used and can cause obscure
> errors.


Maybe we should add an example to that section.

Best.



On Wed, Nov 25, 2015 at 4:03 PM, Ngô Huy <huynhok.uit@vnoss.org> wrote:

> Dear Cuong,
>
> 2015-11-25 15:49 GMT+07:00 Cuong Manh Le <cuong.manhle.vn@gmail.com>:
>
>> Hi Severus,
>>
>> Can you give a demo?
>>
>> You can turn off `multì_func_def` but you can always do multiple function
>> definition with reserved word `function`
>>
>> Best.
>>
>>
>> On Wed, Nov 25, 2015 at 11:20 AM, Ngô Huy <huynhok.uit@vnoss.org> wrote:
>>
>>> Dear Matthew
>>>
>>> 2015-11-25 11:06 GMT+07:00 Matthew Martin <phy1729@gmail.com>:
>>>
>>> > On Tue, Nov 24, 2015 at 9:46 PM, Ngô Huy <huynhok.uit@vnoss.org>
>>> wrote:
>>> > > Dear folks,
>>> > >
>>> > > I found the problem in zsh define function. Demo
>>> > >
>>> > > ls test() { echo "Bug !!!"} && ls && test
>>> > >
>>> > > it will print
>>> > >
>>> > > Bug !!!
>>> > > Bug !!!
>>> >
>>> >
>>> > That's expected behaviour. Since MULTI_FUNC_DEF is set by default in
>>> zsh
>>> > mode, both ls and test are being defined as functions with the body
>>> > echo "Bug !!!".
>>> >
>>> > % func1 func2 () { echo This is "$0"; }
>>> > % func1; func2
>>> > This is func1
>>> > This is func2
>>> > % which func{1,2}
>>> > func1 () {
>>> >         echo This is "$0"
>>> > }
>>> > func2 () {
>>> >         echo This is "$0"
>>> > }
>>> > % unsetopt MULTI_FUNC_DEF
>>> > % func1 func2 () { echo This is "$0"; }
>>> > zsh: parse error near `()'
>>> >
>>>
>>> I know this behavior likes advanced programming language but
>>> multì_func_def
>>> should be turned off by default, it leads to risky problem when someone
>>> searchs as grep, ls malicious strings without quote
>>>
>>>
>>> Kind regards,
>>> Severus
>>>
>>
>> this's just example: cat file | grep foobar(){ rm -rf *}
> grep wil execute rest of body
>
> Kind regards,
> Severus
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Zsh bug] function define bug
  2015-11-25  9:20         ` Cuong Manh Le
@ 2015-11-25  9:39           ` Ngô Huy
  2015-11-25  9:58             ` Cuong Manh Le
  2015-11-25 10:00             ` Peter Stephenson
  0 siblings, 2 replies; 12+ messages in thread
From: Ngô Huy @ 2015-11-25  9:39 UTC (permalink / raw)
  To: Cuong Manh Le; +Cc: Matthew Martin, Zsh Users

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

Dear Cuong,

2015-11-25 16:20 GMT+07:00 Cuong Manh Le <cuong.manhle.vn@gmail.com>:

> Hi Huy,
>
> It's a good point, but in the user perspective, turn off `multifuncdef` is
> not much useful:
>
> $ unsetopt multifuncdef
> $ echo 1 | grep foobar(){ echo 1; }
> zsh: parse error near `()'
>
> You still stuck and can not use `grep`.
>
> The right way to use it from the beginning is quote the grep string
> pattern if it contains any shell meta characters.
>
> Also in zsh documentation
> http://zsh.sourceforge.net/Doc/Release/Options.html#index-MULTIFUNCDEF ,
> it said that:
>
> Multiple function definitions are not often used and can cause obscure
>> errors.
>
>
> Maybe we should add an example to that section.
>
> Best.
>
>
>
> On Wed, Nov 25, 2015 at 4:03 PM, Ngô Huy <huynhok.uit@vnoss.org> wrote:
>
>> Dear Cuong,
>>
>> 2015-11-25 15:49 GMT+07:00 Cuong Manh Le <cuong.manhle.vn@gmail.com>:
>>
>>> Hi Severus,
>>>
>>> Can you give a demo?
>>>
>>> You can turn off `multì_func_def` but you can always do multiple
>>> function definition with reserved word `function`
>>>
>>> Best.
>>>
>>>
>>> On Wed, Nov 25, 2015 at 11:20 AM, Ngô Huy <huynhok.uit@vnoss.org> wrote:
>>>
>>>> Dear Matthew
>>>>
>>>> 2015-11-25 11:06 GMT+07:00 Matthew Martin <phy1729@gmail.com>:
>>>>
>>>> > On Tue, Nov 24, 2015 at 9:46 PM, Ngô Huy <huynhok.uit@vnoss.org>
>>>> wrote:
>>>> > > Dear folks,
>>>> > >
>>>> > > I found the problem in zsh define function. Demo
>>>> > >
>>>> > > ls test() { echo "Bug !!!"} && ls && test
>>>> > >
>>>> > > it will print
>>>> > >
>>>> > > Bug !!!
>>>> > > Bug !!!
>>>> >
>>>> >
>>>> > That's expected behaviour. Since MULTI_FUNC_DEF is set by default in
>>>> zsh
>>>> > mode, both ls and test are being defined as functions with the body
>>>> > echo "Bug !!!".
>>>> >
>>>> > % func1 func2 () { echo This is "$0"; }
>>>> > % func1; func2
>>>> > This is func1
>>>> > This is func2
>>>> > % which func{1,2}
>>>> > func1 () {
>>>> >         echo This is "$0"
>>>> > }
>>>> > func2 () {
>>>> >         echo This is "$0"
>>>> > }
>>>> > % unsetopt MULTI_FUNC_DEF
>>>> > % func1 func2 () { echo This is "$0"; }
>>>> > zsh: parse error near `()'
>>>> >
>>>>
>>>> I know this behavior likes advanced programming language but
>>>> multì_func_def
>>>> should be turned off by default, it leads to risky problem when someone
>>>> searchs as grep, ls malicious strings without quote
>>>>
>>>>
>>>> Kind regards,
>>>> Severus
>>>>
>>>
>>> this's just example: cat file | grep foobar(){ rm -rf *}
>> grep wil execute rest of body
>>
>> Kind regards,
>> Severus
>>
>
> I don't see any case we should use multiple function definition. We also
can not cover all problems with this behavior. I think we should disable it
:)

Kind regards,
Severus

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Zsh bug] function define bug
  2015-11-25  9:39           ` Ngô Huy
@ 2015-11-25  9:58             ` Cuong Manh Le
  2015-11-25 10:00             ` Peter Stephenson
  1 sibling, 0 replies; 12+ messages in thread
From: Cuong Manh Le @ 2015-11-25  9:58 UTC (permalink / raw)
  To: Ngô Huy; +Cc: Matthew Martin, Zsh Users

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

Hi Huy,

See this commit
https://github.com/zsh-users/zsh/commit/b4a198cdda3d499af4e2b4f4a2279f98c8d07433
for an example usage.

Best.

On Wed, Nov 25, 2015 at 4:39 PM, Ngô Huy <huynhok.uit@vnoss.org> wrote:

> Dear Cuong,
>
> 2015-11-25 16:20 GMT+07:00 Cuong Manh Le <cuong.manhle.vn@gmail.com>:
>
>> Hi Huy,
>>
>> It's a good point, but in the user perspective, turn off `multifuncdef`
>> is not much useful:
>>
>> $ unsetopt multifuncdef
>> $ echo 1 | grep foobar(){ echo 1; }
>> zsh: parse error near `()'
>>
>> You still stuck and can not use `grep`.
>>
>> The right way to use it from the beginning is quote the grep string
>> pattern if it contains any shell meta characters.
>>
>> Also in zsh documentation
>> http://zsh.sourceforge.net/Doc/Release/Options.html#index-MULTIFUNCDEF ,
>> it said that:
>>
>> Multiple function definitions are not often used and can cause obscure
>>> errors.
>>
>>
>> Maybe we should add an example to that section.
>>
>> Best.
>>
>>
>>
>> On Wed, Nov 25, 2015 at 4:03 PM, Ngô Huy <huynhok.uit@vnoss.org> wrote:
>>
>>> Dear Cuong,
>>>
>>> 2015-11-25 15:49 GMT+07:00 Cuong Manh Le <cuong.manhle.vn@gmail.com>:
>>>
>>>> Hi Severus,
>>>>
>>>> Can you give a demo?
>>>>
>>>> You can turn off `multì_func_def` but you can always do multiple
>>>> function definition with reserved word `function`
>>>>
>>>> Best.
>>>>
>>>>
>>>> On Wed, Nov 25, 2015 at 11:20 AM, Ngô Huy <huynhok.uit@vnoss.org>
>>>> wrote:
>>>>
>>>>> Dear Matthew
>>>>>
>>>>> 2015-11-25 11:06 GMT+07:00 Matthew Martin <phy1729@gmail.com>:
>>>>>
>>>>> > On Tue, Nov 24, 2015 at 9:46 PM, Ngô Huy <huynhok.uit@vnoss.org>
>>>>> wrote:
>>>>> > > Dear folks,
>>>>> > >
>>>>> > > I found the problem in zsh define function. Demo
>>>>> > >
>>>>> > > ls test() { echo "Bug !!!"} && ls && test
>>>>> > >
>>>>> > > it will print
>>>>> > >
>>>>> > > Bug !!!
>>>>> > > Bug !!!
>>>>> >
>>>>> >
>>>>> > That's expected behaviour. Since MULTI_FUNC_DEF is set by default in
>>>>> zsh
>>>>> > mode, both ls and test are being defined as functions with the body
>>>>> > echo "Bug !!!".
>>>>> >
>>>>> > % func1 func2 () { echo This is "$0"; }
>>>>> > % func1; func2
>>>>> > This is func1
>>>>> > This is func2
>>>>> > % which func{1,2}
>>>>> > func1 () {
>>>>> >         echo This is "$0"
>>>>> > }
>>>>> > func2 () {
>>>>> >         echo This is "$0"
>>>>> > }
>>>>> > % unsetopt MULTI_FUNC_DEF
>>>>> > % func1 func2 () { echo This is "$0"; }
>>>>> > zsh: parse error near `()'
>>>>> >
>>>>>
>>>>> I know this behavior likes advanced programming language but
>>>>> multì_func_def
>>>>> should be turned off by default, it leads to risky problem when someone
>>>>> searchs as grep, ls malicious strings without quote
>>>>>
>>>>>
>>>>> Kind regards,
>>>>> Severus
>>>>>
>>>>
>>>> this's just example: cat file | grep foobar(){ rm -rf *}
>>> grep wil execute rest of body
>>>
>>> Kind regards,
>>> Severus
>>>
>>
>> I don't see any case we should use multiple function definition. We also
> can not cover all problems with this behavior. I think we should disable it
> :)
>
> Kind regards,
> Severus
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Zsh bug] function define bug
  2015-11-25  9:39           ` Ngô Huy
  2015-11-25  9:58             ` Cuong Manh Le
@ 2015-11-25 10:00             ` Peter Stephenson
  2015-11-25 10:13               ` Ngô Huy
  1 sibling, 1 reply; 12+ messages in thread
From: Peter Stephenson @ 2015-11-25 10:00 UTC (permalink / raw)
  To: Ngô Huy, Zsh Users; +Cc: Cuong Manh Le

The MULTI_FUNC_DEF behaviour was there in the shell from the start (and
didn't used to be optional) --- I think it was there mostly for defining
multiple trap functions in one go.  That's about the only standard use,
anyway (there was one instance in the completion code until we removed
it).

Feel absolutely free to turn it otf yourself, but please can we stop the
yes we should / no we shouldn't unless you have new information.

Thanks
pws


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Zsh bug] function define bug
  2015-11-25 10:00             ` Peter Stephenson
@ 2015-11-25 10:13               ` Ngô Huy
  0 siblings, 0 replies; 12+ messages in thread
From: Ngô Huy @ 2015-11-25 10:13 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh Users, Cuong Manh Le

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

Thanks Peter,

I see :)

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-11-25 14:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-25  3:46 [Zsh bug] function define bug Ngô Huy
2015-11-25  4:06 ` Matthew Martin
2015-11-25  4:20   ` Ngô Huy
2015-11-25  8:49     ` Cuong Manh Le
2015-11-25  9:03       ` Ngô Huy
2015-11-25  9:04         ` Ngô Huy
2015-11-25  9:16           ` Christoph (Stucki) von Stuckrad
2015-11-25  9:20         ` Cuong Manh Le
2015-11-25  9:39           ` Ngô Huy
2015-11-25  9:58             ` Cuong Manh Le
2015-11-25 10:00             ` Peter Stephenson
2015-11-25 10:13               ` Ngô Huy

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).