Cmder提高打开速度

https://github.com/cmderdev/cmder/issues/2023中doglex 大佬重新配置了init.bat文件
在这里插入图片描述
亲测结果:
在这里插入图片描述
请将下面的
set GIT_INSTALL_ROOT=C:\Program Files\Git 设置成自己的Git目录
if not defined time_init set time_init=0 #设置为0 ,则/t参数不生效;设置为1,生效,可显示启动时间

修改后的配置如下

@echo off
set CMDER_INIT_START=%time%
set GIT_INSTALL_ROOT=C:\Program Files\Git
if not defined time_init set time_init=0
if not defined max_depth set max_depth=1
if not defined nix_tools set nix_tools=1

set "CMDER_USER_FLAGS= "
if not defined CMDER_ROOT (
    if defined ConEmuDir (
        for /f "delims=" %%i in ("%ConEmuDir%\..\..") do (
            set "CMDER_ROOT=%%~fi"
        )
    ) else (
        for /f "delims=" %%i in ("%~dp0\..") do (
            set "CMDER_ROOT=%%~fi"
        )
    )
)

if "%CMDER_ROOT:~-1%" == "\" SET "CMDER_ROOT=%CMDER_ROOT:~0,-1%"
call "%cmder_root%\vendor\bin\cexec.cmd" /setpath
call "%cmder_root%\vendor\lib\lib_console"
call "%cmder_root%\vendor\lib\lib_git"
call "%cmder_root%\vendor\lib\lib_profile"
call "%cmder_root%\config\user_aliases.cmd"
set "CMDER_SHELL=cmd"
set CMDER_CLINK=1
set CMDER_ALIASES=1
set clink_architecture=x64
set architecture_bits=64
"%CMDER_ROOT%\vendor\clink\clink_%clink_architecture%.exe" inject --quiet --profile "%CMDER_ROOT%\config" --scripts "%CMDER_ROOT%\vendor"
set PLINK_PROTOCOL=ssh
if not defined TERM set TERM=cygwin
set "PATH=%GIT_INSTALL_ROOT%\cmd;%PATH%;%GIT_INSTALL_ROOT%\mingw32\bin;%GIT_INSTALL_ROOT%\mingw64\bin;%GIT_INSTALL_ROOT%\usr\bin;%CMDER_ROOT%\vendor\bin;%CMDER_ROOT%\bin"
if not defined SVN_SSH set "SVN_SSH=%GIT_INSTALL_ROOT:\=\\%\\bin\\ssh.exe"
set git_locale="%GIT_INSTALL_ROOT%\usr\bin\locale.exe"
set LANG=zh_CN.UTF-8
set CMDER_CONFIGURED=1

set CMDER_INIT_END=%time%
if %time_init% gtr 0 (
  "%cmder_root%\vendor\bin\timer.cmd" "%CMDER_INIT_START%" "%CMDER_INIT_END%"
)
exit /b

参考:https://github.com/BandageWorm/Light_Weapon/blob/patch-1/cmder/vendor/init.bat#L11
https://github.com/cmderdev/cmder/issues/2023

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值