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

Re: r problem



On Sep 13,  5:52pm, Wayne Davison wrote:
}
} One potential solution to this would be to change the history-line-drop
} code to lookup "r" in a function list and avoid dropping "r" (but not
} "builtin r") if we find it.  I don't know the function code well enough
} to know if there is an inexpensive call that should_ignore_line() could
} call for this or not.

It's just a hash lookup:

	if (shfunctab->getnode(shfunctab, "r")) {
	    /* It's a function */
	}

As it would only be happening after the command name had already been
compared to (fc|history|r), I don't think it's prohibitively expensive,
though it's exactly what exec.c is going to be doing a few instructions
later.

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