I am using nppExec to remotely (using cygwin rexec or similar), execute makefiles on a unix server.
This works fine. I also got the errors highlighted in red. Which is great. Now I wonder how to jump to the error in the console to the line in the source code file.
This must be done, taking in account that the errormessage contains a different path to the file, as it's a unix path, and the local temporary file is on my windows machine. Nicests would be if it somehow could ignore the path, and just match the name of the file alone, focus first best match, and jump to line.
Can this be done?
Probably you can use Replace Filters - e.g.
Find what: /user/projects/
Replace with: C:\temp\projects\
Thanks.. That works ok…
Now I have a second problem. When I use the output filters to enable jumping to a line, when clicking on an error, another part of my script breaks.
cmd /c type "C:\config\makepath.txt"
echo Executing in $(OUTPUT1)
When enabling the output filters "Enable Console Output Filter" checkbox, my $(OUTPUT1) becomes empty.
Is there another way of getting the content of my file "C:\config\makepath.txt" into a variable that I can use in my script commands?
Ok, so that got figured out. The output filters filtered the result from the command
> cmd /c type "C:\config\makepath.txt"
This makes me wonder, is there a better way to get an file content (first line) into an NPPExec variable?
Or maybe I should start a new thread for that?
I don't know better way for this.
Maybe you can adjust your output filters to keep the string from "makepath.txt" while filtering other strings by using include and exclude masks together.
In next version of NppExec - probably 0.4.3.1 - there will be ability to enable and disable filters during a script execution via NPE_CONSOLE f+/f- r+/r-
> This makes me wonder, is there a better way to get an file content (first line) into an NPPExec variable?
I've just needed something similar - and another guy pointed me to usage of "FOR /F". See "for /?" for detailed examples.
You can print (and modify, if needed) lines of an input file via
cmd /c for /F %i in (filename.txt) do @echo %i
and then use $(OUTPUT1) or whatever in NppExec.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.