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

Reliable zsh-3.0.0 core dump



Install the following function and alias; then execute run-help (via ZLE
with ESC h) more than once.  It works the first time, and dumps core in
parsecomp() the second time (with a trashed stack).

zman() {
    if [[ -f /usr/local/lib/zsh/functions/run-help ]]
    then
	autoload run-help
	FPATH=/usr/local/lib/zsh/functions \run-help $1
    elif [[ -f /usr/local/lib/zsh/help/$1 ]]
    then less /usr/local/lib/zsh/help/$1
    else man $1
    fi
}
alias run-help zman

I found this by accident, because if you change it to be:

zman() {
    if [[ -f /usr/local/lib/zsh/functions/run-help ]]
    then
	autoload run-help
	unalias run-help				# Added this line
	FPATH=/usr/local/lib/zsh/functions \run-help $1
    elif [[ -f /usr/local/lib/zsh/help/$1 ]]
    then less /usr/local/lib/zsh/help/$1
    else man $1
    fi
}

Then it works exactly as desired.

-- 
Bart Schaefer                             Brass Lantern Enterprises
http://www.well.com/user/barts            http://www.nbn.com/people/lantern

New male in /home/schaefer:
>N  2 Justin William Schaefer  Sat May 11 03:43  53/4040  "Happy Birthday"



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