- Babun - a windows shell you will love
- Cmder - Portable console emulator for Windows
- Settings
- Nodejs
- FAQ
- Reference
Babun - a windows shell you will love
Cmder - Portable console emulator for Windows
Settings
打开 Babun, 执行 babun check
,检查安装是否成功。
{ ~ } » babun check ~Executing babun checkPrompt speed [OK]Connection check [OK]Update check [OK]Cygwin check [OK]
babun check 用于判断环境是否正确
babun update 用于判断是否有新的更新包
babun 自带 pact 包管理
{ ~ } » pact --helppact: Installs and removes Cygwin packages.Usage: "pact install" to install given packages "pact remove " to remove given packages "pact update " to update given packages "pact show" to show installed packages "pact find " to find packages matching patterns "pact describe " to describe packages matching patterns "pact packageof " to locate parent packages "pact invalidate" to invalidate pact caches (setup.ini, etc.)Options: --mirror, -m : set mirror --invalidate, -i : invalidates pact caches (setup.ini, etc.) --force, -f : force the execution --help --version
.minttyrc
配置文件:
BackgroundColour=57,56,57ForegroundColour=238,238,238CursorColour=238,238,238Black=0,0,0BoldBlack=89,89,89Red=229,32,130BoldRed=238,105,171Green=130,229,32BoldGreen=171,238,105Yellow=229,130,32BoldYellow=238,171,105Blue=32,130,229BoldBlue=105,171,238Magenta=130,32,229BoldMagenta=171,105,238Cyan=32,229,130BoldCyan=105,238,171White=238,238,238BoldWhite=255,255,255Transparency=mediumOpaqueWhenFocused=noCursorType=blockBoldAsFont=yesAllowBlinking=noColumns=120Rows=40Font=Source Code Pro MediumFontHeight=12CursorBlinks=noBellTaskbar=no
wget https://bootstrap.pypa.io/get-pip.py -O - | python
-
Clone this repository into $ZSH_CUSTOM/plugins (by default ~/.oh-my-zsh/custom/plugins)
$ git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
-
Add the plugin to the list of plugins for Oh My Zsh to load:
plugins=(zsh-autosuggestions)
-
Start a new terminal session, or:
$ source ~/.zshrc
- Grab a copy of autojump:
$ git clone git://github.com/joelthelion/autojump.git $ZSH_CUSTOM/plugins/autojump && cd $ZSH_CUSTOM/plugins/autojump
- Run the installation script and follow on screen instructions.
./install.py or ./uninstall.py
- Please manually add the following line(s) to ~/.zshrc:
[[ -s /home/gongyuqi/.autojump/etc/profile.d/autojump.sh ]] && source /home/gongyuqi/.autojump/etc/profile.d/autojump.sh
autoload -U compinit && compinit -u
Please restart terminal(s) before running autojump.
-
If you prefer a manual installation, please use the following instructions:
$ git clone git://github.com/petervanderdoes/gitflow.git $ZSH_CUSTOM/plugins/gitflow && cd $ZSH_CUSTOM/plugins/gitflow
-
Then, you can install git-flow, using:
$ sudo make install
-
If you prefer a manual installation, please use the following instructions:
$ git clone https://github.com/tj/git-extras.git $ZSH_CUSTOM/plugins/git-extras && cd $ZSH_CUSTOM/plugins/git-extras
-
Then, you can install git-extras, using:
$ sudo make install
Note: If you are a zsh user, you may want to 'source /home/gongyuqi/.oh-my-zsh/custom/plugins/git-extras//etc/git-extras-completion.zsh' and put this line into ~/.zshrc to enable zsh completion
-
If you prefer a manual installation, please use the following instructions:
$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
-
Add the plugin to the list of plugins for Oh My Zsh to load:
plugins=(zsh-syntax-highlighting)
-
Start a new terminal session. or:
$ source ~/.zshrc
-
If you prefer a manual installation, please use the following instructions:
$ git clone https://github.com/zsh-users/zsh-completions $ZSH_CUSTOM/plugins/zsh-completions
-
Add the plugin to the list of plugins for Oh My Zsh to load:
plugins=(zsh-completions)
-
Start a new terminal session. or:
$ source ~/.zshrc
-
If you prefer a manual installation, please use the following instructions:
$ curl -O https://github.com/AlDanial/cloc/archive/v1.72.tar.gz ~/cloc && tar -zxvf v1.72.tar.gz && cd ~/cloc
-
Then, you can install git-extras, using:
$ sudo make install
or, It is recommended to install cloc with choco:
$ choco install cloc
It is recommended to install httpie with pip:
# Make sure we have an up-to-date version of pip and setuptools:$ pip install --upgrade pip setuptools$ pip install --upgrade httpie
It is recommended to install cheat with pip:
$ [sudo] pip install cheat
将 babun 添加到 cmder:
-
Add new task in CMDER settings
`Win + Alt + P` to open settings, then go to `Startup > Tasks`.Then hit the `+` symbol on the bottom to create a new task
- Rename the task to Babun (or whatever you want)
-
Add this command in Task Parameters:
/icon "%userprofile%\.babun\cygwin\bin\mintty.exe" /dir "%userprofile%"
-
Add this command in Commands:
%userprofile%\.babun\cygwin\bin\mintty.exe -o Transparency=0 /bin/env CHERE_INVOKING=1 /bin/zsh.exe
"Open Cmder Here" in context menu
To add an entry in the Windows Explorer context menu to open Cmder in a specific directory, paste this into a OpenCmderHere.reg file and double-click to install it.
Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder]@="Open Cmder Here"[HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder\command]@=hex(2):25,00,43,00,4d,00,44,00,45,00,52,00,5f,00,49,00,4e,00,\ 53,00,54,00,41,00,4c,00,4c,00,5f,00,44,00,49,00,52,00,25,00,5c,00,43,00,6d,\ 00,64,00,65,00,72,00,2e,00,65,00,78,00,65,00,20,00,2f,00,53,00,54,00,41,00,\ 52,00,54,00,20,00,22,00,25,00,76,00,22,00,00,00
Cmder 中文显示问题(1.3以上)
文字重叠
取消勾选设置中的Monospace选项
中文乱码
在Settings > Startup > Environment里添加:set LANG=zh_CN.UTF8
Nodejs
This is not the same thing as nvm, which is a completely separate project for Mac/Linux only.
Tip:安装目录不要出现空格
settings.txt
root: yourpath\nvmpath: yourpath\nodejsarch: 64proxy: nonenode_mirror: http://npm.taobao.org/mirrors/node/npm_mirror: https://npm.taobao.org/mirrors/npm/
配置系统环境变量,
%NVM_HOME%: yourpathnvm
%NVM_SYMLINK%: yourpathnodejs%NPM_HOME%: yourpathnpm添加 npm 命令
dos2unix '/cygdrive/c/Program Files/nodejs/npm'cygstart /bin/zsh
Install
$ npm install -g nrm
Usage
Usage: nrm [options] [command] Commands:ls List all the registriesuseChange registry to registryadd [home] Add one custom registrydel Delete one custom registryhome [browser] Open the homepage of registry with optional browsertest [registry] Show the response time for one or all registrieshelp Print this help Options:-h, --help output usage information-V, --version output the version number
FAQ
出现以下问题:
compdef: unknown command or service: gitcompdef: unknown command or service: grepcompdef: unknown command or service: git
解决方案:
compaudit | sudo xargs chmod g-wcompaudit | sudo xargs chown rootrm ~/.zcompdump*compinit
出现以下问题:
66835 error Error: EPERM: operation not permitted, rename 'D:\Desktop\work\website\node_modules\.staging\abbrev-67f8252c' -> 'D:\Desktop\work\website\node_modules\abbrev'66835 error at Error (native) parent: 'website' }66836 error Please try running this command again as root/Administrator.66837 verbose exit [ -4048, true ]
解决方案:
使用管理员权限运行 cmd,node.exe 设置属性为, 以管理员身份运行此程序。
出现以下问题:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ WARNING: UNPROTECTED PRIVATE KEY FILE! @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@Permissions 0744 for '/home/geek/.ssh/id_rsa' are too open.It is recommended that your private key files are NOT accessible by others.This private key will be ignored.bad permissions: ignore key: /home/geek/.ssh/id_rsa
解决方案:
sudo chmod 600 ~/.ssh/id_rsasudo chmod 600 ~/.ssh/id_rsa.pub
出现以下问题:
CreateProcess Failed with error 740: ��ֹ�����������
解决方案:
由于使用了 nvm-windows , 需要修改 webStorm
的 node
依赖。 e.g. D:\yourpath\nvm\v6.11.2\node.exe