If you want them, you would have to parse those rc files (.zshrc, .bashrc, .profile etc) yourself as the respective shell does, then traverse the alias list to resolve nested aliases and use the commands in the form they are aliased as instead of the plain command.
Looks to me like a lot of trouble and error-prone too, as different users/shells have different aliasing gustos, and what use is it to get plain ls invoked as e.g. ls -aFC --color=tty and have to take care of all possible arbitrary ouput of such an ls call?
You're better off just providing the switches to programs you invoke with system() yourself, since then you know what to expect.
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
In reply to Re: spawning shell commands with aliases
by shmem
in thread spawning shell commands with aliases
by xafwodahs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |