Originally Posted by Ketho
I followed your advice and am doing it from the .bat now and referring to it from NppExec, and it works now!
Really curious why it doesn't work straight from NppExec though ..
For reference (for myself):
nppexec Code:
"D:\FindGlobals\globals.bat" "$(FULL_CURRENT_PATH)"
bat Code:
luac51 -l -p %1 | lua51 "D:\FindGlobals\globals.lua" %1
|
I know this thread is old, but just wanted to satisfy the curiosity ...
The functionality of the pipe operator (which is to redirect the standard output of the left-hand-side command as the standard input of the right-hand-side command) is supported by the Windows Command Shell (cmd.exe), not by NppExec. So if you do it from the .bat file it works because the .bat file is run by cmd.exe.
Alternatively you could have done the following from within NppExec:
Code:
cmd /c luac51 -l -p "$(FULL_CURRENT_PATH)" | lua51 "D:\FindGlobals\globals.lua" "$(FULL_CURRENT_PATH)"
which would start a cmd.exe with the rest of the command line, so the pipe would still work as expected.