简体   繁体   English

如何在Mac OS上将zsh shell更改为git shell?

[英]How to change zsh shell to git shell on Mac OS?

guys! 伙计们! I want to change zsh shell to git shell on Mac Os. 我想在Mac OS上将zsh shell更改为git shell。 Because I have a problem to launch gulp builder. 因为我在启动gulp生成器时遇到问题。 =( screen =( 屏幕

The problem is not zsh but the fact that you don't have gulp installed in a directory where the shell searches for it. 问题不是zsh ,但事实上,你没有gulp安装在一个目录,它的外壳搜索。 No shell is able to find the executable gulp program because it is not in the $PATH environment variable. 没有外壳程序可以找到可执行的gulp程序,因为它不在$PATH环境变量中。

Solution #1 解决方案1

If you are using gulp for only one project then you probably have it installed in the current project (run npm list --depth=0 in the project directory to check). 如果仅将gulp用于一个项目,则可能已将其安装在当前项目中(在项目目录中运行npm list --depth=0进行检查)。 If this is the case, run it as: 如果是这种情况,请按以下方式运行:

$ node_modules/.bin/gulp

Solution #2 解决方案#2

If you are using gulp for many projects it could be useful to install it globally, at the account level. 如果将gulp用于许多项目,则在帐户级别全局安装gulp可能会很有用。 For that, run the following command in any directory: 为此,请在任何目录中运行以下命令:

$ npm install -g gulp

Make sure you already have a bin directory in your home directory (create it using mkdir -p ~/bin ) because this command creates a symlink to the gulp executable in it. 确保您的主目录中已经有一个bin目录(使用mkdir -p ~/bin创建它),因为此命令将在其中创建到gulp可执行文件的符号链接。

This symlink makes gulp available as a program to be executed from any directory. 此符号链接使gulp可用作要从任何目录执行的程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM