Babun
a windows shell you will lovehtml
Babun features the following:python
- Pre-configured Cygwin with a lot of addons
- Silent command-line installer, no admin rights required
- pact - advanced package manager (like apt-get or yum)
- xTerm-256 compatible console
- HTTP(s) proxying support
- Plugin-oriented architecture
- Pre-configured git and shell
- Integrated oh-my-zsh
- Auto update feature
- "Open Babun Here" context menu entry
Babun 安装方式:
- 进入官网点下载;
- 下载完成后,解压软件包,找到:
install.bat
双击,安装开始,安装完成后,会在桌面建立一个babun的快捷方式。
安装完成后,能够考虑换一下cygwin的源:linux
cd ~ vim .pact/pact.repo PATC_REPO=http://mirrors.163.com/cygwin
Babun 用法
{ d } » babun -h /cygdrive/d babun: Manages the instance of babun. Usage: "babun update" to fetch the newest version of babun "babun check" to check if the installation is correct "babun shell" to display the name of the user's default shell (may not be the currently used shell) "babun shell <new_shell>" to set the user's default shell to new_shell "babun install" to (re)install babun to the current user's home folder "babun login" to login to the user's default shell "babun <plugin_name> cmd" to execute cmd provided by the given plugin Options: --help --version --welcome
Babun Python配置
由于Babun默认的Python是python2,因而先删除了链接再根据我系统中Python所在文件夹建立了python的连接git
cd /usr/bin rm -rf python ln -s /cygdrive/c/ProgramData/Anaconda3/python.exe /usr/bin/python python -i #在Babun中,须要加上-i参数,才能正常启动python
cmder
cmder 安装方式
- Unzip
- (optional) Place your own executable files into the bin folder to be injected into your PATH.
- Run Cmder (Cmder.exe)
cmder配置
1.添加 cmder 到右键菜单,管理员权限打开自带cmd,运行以下命令:github
Cmder.exe /REGISTER ALL
此外,启动设置shell
去除 *cmd /k ""%ConEmuDir%\..\init.bat" " 改成:cmd /k “%ConEmuDir%..\init.bat” -new_console:d:%CD%
2.中文显示 settings->Startup->Environmenvim
set LANG=zh_CN.UTF-8
3.alias设置 cmder文件夹->config->user-aliases.cmdwindows
ll=ls --show-control-chars -aF --color $*
4.设置分屏的快捷键 我将分屏快捷键设置为了 ctrl+shift+→
。ssh
进入 Settings->Keys&Macro,搜索 Split: Duplicate
设置。ide
将Babun整合到ConEmu/cmder
再把babun添加到cmder的tab选项中,
- Startup>Tasks面板点+号添加一个task,名称输入babun,
- Task parameters填入
/icon "%userprofile%\.babun\cygwin\bin\mintty.exe" /dir "%userprofile%"
, - Commands填入
%userprofile%\.babun\cygwin\bin\mintty.exe /bin/env CHERE_INVOKING=1 /bin/zsh.exe
,
保存后,就能够在cmder新建一个babun的窗口,默认的shell是zsh,搭配好了oh-my-zsh
的配置
用Babun的好处是,几乎linux的命令均可以直接使用,好比rsync
ssh登陆linux机器
ssh 用户名@ip exit #退出ssh登陆