Under wine you need to specify the full path to the unix (or linux) executable you want to execute. I've successfully used this on my install of wine, so I can confirm it is not Windows only. This is probably why /exec ls won't "just work", though, and the dll may seem broken (but is not).

exec.dll initializes cmd.exe to run commands-- this is slightly unlike /run, which uses CreateProcess() directly. This is equivalent to running `wine cmd` to open a cmd.exe shell.

For instance, to run a shell script, you'd need to directly call "\bin\sh" (/bin/sh won't work because of cmd.exe's handling of path separators). You can see this in wine cmd as well.

Anyway, try:

Code:
/exec \bin\sh -c "ps auxww | grep ^`whoami`"


It looks ugly, but you can wrap this up in a clean alias:

Code:
alias wexec exec \bin\sh -c $qt($1-)


And then you can use commands like:

Code:
/wexec ls -la | grep \.exe$


Note that you can also set the %COMSPEC% environment variable in wine to point to some script (and not cmd.exe). exec.dll uses this variable to spawn the process in CreateProcess. You could theoretically set this to a perl or shell script that ran code. You can't use \bin\sh directly because exec.dll passes '/c', not '-c', as an argument before the actual command, so you'd have to write a wrapper script to filter it out. Perhaps it might be wiser to have exec.dll just call CreateProcess with $1- and let the .mrc file insert cmd /c, that way users could more easily modify this for wine systems, but unfortunately I'd need to release a new version for that.

In any case, you can set %COMSPEC% to "/path/to/myscript.sh" (use `winepath` to get this path) with an executable script that looks like:

Code:
#!/bin/sh
shift # remove '/c' argument
$*    # run commands


And you should be able to /exec without modification to aliases.



- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"