如何在Atom中安装shell命令以启用atom命令? [英] How to install shell commands in Atom to enable the atom command?

查看:520
本文介绍了如何在Atom中安装shell命令以启用atom命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以告诉我如何为Atom安装Shell命令以在命令行中启用atom命令吗?

Could someone please tell me how to install the shell commands for Atom to enable the atom command in the command line?

推荐答案

根据Atom 飞行手册,当您首次运行Atom时应该安装它们.

According to the Atom Flight Manual, they should be installed when you run Atom for the first time.

首次打开Atom时,它将尝试安装atomapm命令以在终端中使用.在某些情况下,Atom可能无法安装这些命令,因为它需要管理员密码.例如,要检查Atom是否能够安装atom命令,请打开一个终端窗口,然后键入which atom.如果已安装atom命令,您将看到类似以下内容的内容:

When you first open Atom, it will try to install the atom and apm commands for use in the terminal. In some cases, Atom might not be able to install these commands because it needs an administrator password. To check if Atom was able to install the atom command, for example, open a terminal window and type which atom. If the atom command has been installed, you'll see something like this:

$ which atom
/usr/local/bin/atom
$

如果未安装atom命令,则which命令将不返回任何内容:

If the atom command wasn't installed, the which command won't return anything:

$ which atom
$

要安装atomapm命令,请从

To install the atom and apm commands, run "Window: Install Shell Commands" from the Command Palette, which will prompt you for an administrator password.

在我的系统(Mac机)上,它们安装在/usr/local/bin中,但是位置可能会因所使用的平台而异.

On my system (a Mac), they are installed in /usr/local/bin, but the location might vary depending on which platform you are using.

编辑:我看到您的其他问题,表示您正在使用Windows.因此,这可能不适用于您,因为引用的部分与Mac计算机有关.但是我会在这里留下答案,以防将来对其他人有所帮助.

EDIT: I see your other question where you indicate you're using Windows. So this may not apply to you, as the quoted section deals with Mac computers. But I'll leave the answer here in case it helps someone else in the future.

这篇关于如何在Atom中安装shell命令以启用atom命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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