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

make aliases work inside the function? (using a preprocessor?)



hello zsh people,

I have

    % which €
	€ () {
	setopt localoptions unset nowarncreateglobal
	"$@" }
    % which l
        l: aliased to print -l
    % € l error 
        €: command not found: l

sometimes i really need aliases.
sometimes aliases seems to work inside functions.
sometimes i made some hacks like

	eval "xx () { $functions[xx] }"

sometimes it works, sometimes it doesn't. i spend some time in the
manual to make up my mind about how to fix it.

i guess i'll use a preprocessor (m4?) and maybe even an existing lib
(m4sh?) to generate my zsh scripts. any ideas about it?

regards.
marc




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