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

Re: Problem with function



On May 7, 12:03pm, Bruno Bonfils wrote:
}
} mutt () {
}         print -Pn "\e]0; Mutt\a"
}         \mutt
} }
} 
} the print are executed (and work with screen) but the zsh
} session crash :(

Using \mutt does NOT stop the mutt function from being called.  It only
stops an *alias* for mutt from expanding, if you had one.  Zsh crashes
because the heap overflows allocating memory for the infinitely recursive
function that you've written.

You want:

    mutt () {
      print -Pn "\e]0; Mutt\a"
      command mutt
    }

This is question 3.16 in the FAQ, by the way.

If you compiled zsh yourself, check out the --enable-max-function-depth
flag that you can pass to the configure script.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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