Thank you David T-G, Thorsten Haude, David Champion and Thomas Dickey! I got my zsh alias working from mutt by rebinding "!" as a macro as David T-G suggested:
bind generic ! noop bind generic \\ shell-escape macro generic ! \\"zsh -c " Truly, Aleksey. P.S. Notes on the alias expansion mystery: I tried compiling with --with-exec-shell=/usr/local/bin/zsh and it looked like !commands were executed with zsh - but without alias expansion. When I'd press !\n, I'd get the shell that mutt "shell" variable was set to. If I did !cmd\n, the cmd was run using EXECSHELL (zsh) *but no alias expansion*. On Mon, May 13, 2002 at 02:45:06PM -0400, Thomas E. Dickey wrote: > > if mutt's using system(), that's usually defined to /bin/sh, ignoring your > $SHELL variable. I looked and mutt 1.3.99 uses mutt_system which does a fork and execl (EXECSHELL, "sh", "-c", cmd, NULL); (and I checked and zsh alias expansion works in both interactive and non-interactive shells.) --- My C is pretty weak but execl (EXECSHELL, "sh", "-c", cmd, NULL); looks odd when I know EXECSHELL is /usr/local/bin/zsh. I'm not quite sure what this does, it looks like it specifies the path /usr/local/bin/zsh but then invokes it as sh? That would certainly explain the lack of aliases!