安装请参考Cmder安装笔记

常用功能

1. 环境应用

进入Settings>Startup>Environment即可设置

1.1. 添加快速登录命令

alias login=ssh name@serverIP

1.2. 添加ASCII绘画

比如添加猫绘画

echo "    Zzzzz  |\      _,,,--,,_        +-----------------------------+"
echo "           /,`.-'`'   ._  \-;;,_    | Why is there always a cat   |"
echo "          |,4-  ) )_   .;.(  `'-'   | on whatever you're editing? |"
echo "         '---''(_/._)-'(_\_)        +-----------------------------+"

需要注意font设置,我的是
cmder_font

1.3. 添加ssh快捷登录

填写一个IP后快速登录该地址

alias sl=set /P address=Enter server address:  $t IF %address% GTR 0 (ssh root@%address%) ELSE (echo You need input address)

1.4. 添加sahaba

  1. 设置sahaba环境变量
set SAHABA=D:\develop\sahaba\sahaba
  1. 添加sahaba命令
  • 登录
alias shbl=%SAHABA% login
  • 查找pod
alias shbp=set /P pod=Enter pod name: $t   IF %pod% GTR 0 (%SAHABA% get pods | grep %pod%) ELSE (echo You need input pod name)
  • 进入pod
alias shbe=set /P ip=Enter pod ip: $t   IF %ip% GTR 0 (%SAHABA% exec -ti -d %ip% bash) ELSE (echo You need input pod ip)

参考地址