如何启用atom.io读取STDIN? [英] How to enable atom.io to read STDIN?
问题描述
是否有一种简便的方法将内容传递给编辑器原子?
Is there an easy way to pipe content to the editor atom?
例如:
echo "Content." | atom
不幸的是,原子没有得到内容.当前版本的gedit具有参数-
以启用读取STDIN:
Unfortunately atom does not get the content. The current version of gedit has the parameter -
to enable reading of STDIN:
echo "Content." | gedit -
我在atom-help(atom -h
)
I could not find a similar option in the atom-help (atom -h
)
推荐答案
感谢您提出有关此问题!我刚才碰到了同样的问题.
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?
当前的atom
命令行界面(CLI)不会打开通过管道传输到其标准输入(stdin
)的内容.
The current atom
command-line interface (CLI) will not open content piped to its standard input (stdin
).
有一个拉动请求可以添加此功能.提议的解决方案将stdin
中的内容写入/tmp
中的文件,然后在Atom中打开该文件.
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.
这篇关于如何启用atom.io读取STDIN?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!