如何启用atom.io读取STDIN? [英] How to enable atom.io to read STDIN?

查看:95
本文介绍了如何启用atom.io读取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.

现在,如果您愿意破解atom CLI,则可以手动应用

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

这篇关于如何启用atom.io读取STDIN?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆