item2 加载了很多东西后,启动变得无比的慢,每次启动都要等一分钟左右,于是给zsh 启动加个动画。以解除等待时候的烦躁心情。
效果如下:

操作步骤 loading.js
cat ~/.loading.js var loading = require('loading-cli');
var load = loading(" 正在准备终端...");
load.frames = ["◐", "◓", "◑", "◒"];
load.start() setTimeout(function(){ load.text = " 外部电源接触...没有异常"; },400); setTimeout(function(){ load.text = " 思考形态以中文为基准,进行思维连接..."; },800); setTimeout(function(){ load.text = " 同步率为 110.00%"; },1500);
setTimeout(function(){ load.text = " 交互界面连接..."; },1800); setTimeout(function(){ load.text = " 安全装置解除..."; },2100);
setTimeout(function(){ load.stop(); console.log(" 启动成功!\n"); },3000)
|
2.ans.txt
^[[30C ^[[41mFBI WARNING^[(B^[[0m
^[[8C Federal Law provides severe civil and criminal penalties for ^[[8C the unauthorized reproduction, distribution, or exhibition of ^[[8C copyrighted motion pictures (Title 17, United States Code, ^[[8C Sections 501 and 508). The Federal Bureau of Investigation ^[[8C investigates allegations of criminal copyright infringement ^[[13C (Title 17, United States Code, Section 506).
|
在启动命令中加入

cat ~/.2.ans.txt && ~/.nvm/versions/node/v11.10.1/bin/node ~/.loading.js
|
文章作者:阿文
版权声明:本博客所有文章除特别声明外,均采用
CC BY-NC-SA 4.0 许可协议。转载请注明来自
阿文的博客!