How do I pipe output into Visual Studio Code?
As of September 2016, it does not appear to be supported, but there's an open issue to implement it:
https://github.com/Microsoft/vscode/issues/6161
I'm on Ubuntu Gnome 17.10 (Artful Aardvark), and I run Visual Studio Code v1.19.3. Just piping to code
is not enough to bin to stdin.
$ ps aux | code
Run with 'code -' to read from stdin (e.g. 'ps aux | grep code | code -').
You have to add the -
operator:
$ ps aux | code -
That's working and opens a new text tab filled by the command output.
Since version 1.19.1, you can pipe your output to the current window by invoking:
<command> | code -
If you are using version 1.19 or earlier, you don't need the arg:
<command> | code