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

查看:30
本文介绍了如何在 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 命令,请从 Command Palette,它会提示您输入管理员密码.

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天全站免登陆