zsh-users
 help / color / mirror / code / Atom feed
* make aliases work inside the function? (using a preprocessor?)
@ 2016-05-04 13:46 Marc Chantreux
  2016-05-04 14:04 ` Peter Stephenson
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Marc Chantreux @ 2016-05-04 13:46 UTC (permalink / raw)
  To: zsh-users

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-05-09 12:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-04 13:46 make aliases work inside the function? (using a preprocessor?) Marc Chantreux
2016-05-04 14:04 ` Peter Stephenson
2016-05-04 14:55 ` Oliver Kiddle
2016-05-04 17:21 ` Bart Schaefer
2016-05-09 12:30   ` Marc Chantreux

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).