On OSX TextMate have the alias mate
which you can use with the pipe to open other program's stdout.
How can I achieve the same effect in Windows 7 with Notepad++?
Ex.: git diff master|edit
Answer
No, Windows does not have equivalent functionality to /dev/stdin
or /dev/fd
on Unixes. (It would be stdin, not stdout, from Notepad++'s point of view.) While GUI programs can read from stdin, they must be specially written to do so.
@echo off & setlocal
set f=%temp%\stdin-%random%%random%%random%.txt
more > "%f%"
start /wait notepad++ "%f%"
del "%f%"
If you don't want the batch file to "/wait" for notepadd++ to exit, you can replace the above "start /wait" line with these two lines:
start notepad++ "%f%"
REM Windows timeout won't work inside batch files. Use ping hack instead.
ping 127.0.0.1 -n 3 -w 10000 > nul
No comments:
Post a Comment