停止改变shell / cmd标题名称 [英] stop gulp from changing shell/cmd title name
问题描述
当我们调用gulp时,它将我的cmd(windows)标题更改为:gulp
我希望窗口名称保持原样
我知道我可以使用 https://www.npmjs .com / package / gulp-shell
但是这看起来像是一个过度杀伤的行为
我的意思是说,如果我打电话给批处理脚本
title mytitle
gulp。
窗口的标题是gulp而不是mytitle
<解决方案使用 process.title
如本期所述: concat process.title而不是覆盖。您应该使用 process.cwd()
来获取运行gulp文件的目录。
您的gulp文件中的某处,根据你的需要,写:
process.title = process.cwd();
When gulp is called the it changes my cmd (windows) title to: "gulp"
I want the window name to stay as it was
I know I can use https://www.npmjs.com/package/gulp-shell but this seems like an overkill
I mean that if I call batch script
title mytitle
gulp .
the window's title is "gulp" and not "mytitle"
Use process.title
as stated in this issue : concat process.title instead of overwrite. You shoud use process.cwd()
to get the directory where the gulpfile is running.
somewhere in your gulpfile, according to your need, write:
process.title = process.cwd();
这篇关于停止改变shell / cmd标题名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!