How to enable atom.io to read STDIN?

ぃ、小莉子 提交于 2020-04-13 10:35:13

问题


Is there an easy way to pipe content to the editor atom?

For example:

echo "Content." | atom

Unfortunately atom does not get the content. The current version of gedit has the parameter - to enable reading of STDIN:

echo "Content." | gedit -

I could not find a similar option in the atom-help (atom -h)


回答1:


Thank you for asking about this! I just now bumped into the same issue.

Is there an easy way to pipe content to the editor atom?

The current atom command-line interface (CLI) will not open content piped to its standard input (stdin).

There's a Pull Request open to add this functionality. The proposed solution writes contents from stdin to a file in /tmp, then opens that file in Atom.

For now, if you're open to hacking the atom CLI, you could manually apply the changes proposed there.



来源:https://stackoverflow.com/questions/33237732/how-to-enable-atom-io-to-read-stdin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!