问题描述
我已经下载了 Catalina 的新 Mac OS 版本 Beta.现在我应该开始使用 Zsh 了.但是当我想在 Atom 中运行一个 Angular 项目时,我收到了这条消息:默认的交互式 shell 现在是 zsh.要更新您的帐户以使用 zsh,请运行 chsh -s/bin/zsh
.有关更多详细信息,请访问 https://support.apple.com/kb/HT208050."我已经在使用 zsh 终端,但他没有找到 ng 命令.
I have download the new Mac OS Version Beta of Catalina. Now I should start to use Zsh. But when I want to run a Angular project in Atom, I receveid this message : "The default interactive shell is now zsh.To update your account to use zsh, please run chsh -s /bin/zsh
.For more details, please visit https://support.apple.com/kb/HT208050."I'am already using zsh Terminal but he doesn't found the ng commands.
推荐答案
在 Catalina 升级后转移到 zsh 后,我也无法访问我的命令.这为我修复了它:source/Users/YOURUSERNAME/.bash_profile
I also lost access to my commands after moving over to zsh following the Catalina upgrade. This fixed it for me:source /Users/YOURUSERNAME/.bash_profile
为了让这些更改持续存在,我使用了 oh-my-zsh (https://github.com/robbyrussell/oh-my-zsh).
In order to get these changes to persist, I used oh-my-zsh (https://github.com/robbyrussell/oh-my-zsh).
使用 curl 安装:sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Install with curl:sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
然后修改您的 .zshrc 文件:vi ~/.zshrc
Then modify your .zshrc file:vi ~/.zshrc
在这一行下面:source $ZSH/oh-my-zsh.sh
我只是添加了我在帖子开头提到的命令:
I simply added the command I mentioned at the start of the post:
source/Users/YOURUSERNAME/.bash_profile
像通常使用 vi/vim 一样保存文件::wq
Save the file as you normally would with vi/vim: :wq
Oh-my-zsh 也有很多很酷的东西,所以一定要阅读文档.
Oh-my-zsh is also capable of a lot of cool things so be sure to read the documentation.
这篇关于Zsh:找不到命令:新 Mac OS Catalina 上的 ng的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!