Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
make aliases work inside the function? (using a preprocessor?)
- X-seq: zsh-users 21511
- From: Marc Chantreux <khatar@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: make aliases work inside the function? (using a preprocessor?)
- Date: Wed, 4 May 2016 13:46:32 +0000
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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