in reply to spawning shell commands with aliases
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}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: spawning shell commands with aliases
by xafwodahs (Scribe) on Dec 19, 2006 at 19:37 UTC | |
by Fletch (Bishop) on Dec 20, 2006 at 00:59 UTC | |
by shmem (Chancellor) on Dec 19, 2006 at 21:49 UTC |