Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug report: segfault when pasting (function and alias names collide)



Victor Volle wrote on Thu, Jan 05, 2017 at 17:21:03 +0100:
> I think this may already have been reported in 2010:
> https://www.zsh.org/mla/workers/2010/msg00521.html
> but it does not seem to be fixed.

The part with function and alias has not been "fixed" because it's not
a bug.  To define a function without interpreting aliases in the
function name, use this syntax:

    function f {
      ⋮
    }

> If the redefinition is problematic, would it be possible to trigger an
> error, when the function
> is defined? A segfault when pasting seems to be quite bad.

All segfaults are bug, but how do you reproduce this one?  I did:

$ zsh -f
% history() {
  ⋮ copied the function body from your mail
  }
% <paste>

and it did not segfault.  Can you provide a minimal reproduction script
starting from `zsh -f`?  (and without third party modules, if at all
possible)

Thanks,

Daniel



Messages sorted by: Reverse Date, Date, Thread, Author