problem piping the output of a command to an editor from bash
Windows Version: 15063.483
from bash - ubuntu 16.04 - if I try to pipe output of a command to a windows text editor, it just opens the editor without the output of the command. Ex:
$ svn diff -r 2255:2246 file | subl -
it just opens my sublime editor with a new file called -.
If i run the same command using a linux text editor, it works fine. Ex:
$ svn diff -r 2255:2246 file | vi -
this opens vi with the diff in the editor.
In order for this to work subl will need to support the '-' argument the same way vi does. In your above steps subl an alias to sublime_text.exe?
that is correct. It didn't occur to me that this could be an issue with the editor. I appreciate the quick response
Seems like piping to stdin is a macOS only feature:
Reading from standard input only works in OS X.
See: http://docs.sublimetext.info/en/latest/command_line/command_line.html#invocations