在Windows环境中使用git-bash+zsh+oh-my-zsh

安装git

首先先下载 git 并进行安装

Git – Downloading Package (git-scm.com)

设置WindowsTerminal启动GitBash

在windows的terminal中增肌git bash 的配置,并设置为启动

  1. 进入windows termial 的设置
  2. 添加新配置
  3. 新建空的配置文件
  4. 选择执行文件是:C:\Program Files\Git\bin\bash.exe
  5. 名称改为:GitBash
  6. 回到启动 ,选择新的 GitBash配置
  7. 这样点击+号打开的终端,就是 git bash 了

下载并配置zsh

下载 windows 版本的zsh ,地址如下

Package: zsh – MSYS2 Packages

下载的zsh是压缩格式,使用 https://peazip.github.io/ 进行解压

PeaZip free archiver utility, open extract RAR TAR ZIP files

解压之后,将文件夹 etc 和 usr 复制到 git 的安装地址:
C:\Program Files\Git

这样在git bash 终端里面就可以执行 zsh命令

配置 zsh 为git bash 的默认终端

编辑 ~/.bashrc 设置以下内容

if [ -t 1 ]; then
  exec zsh
fi

安装oh-my-zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

安装几个常用的插件

zsh-syntax-highlighting/INSTALL.md at master · zsh-users/zsh-syntax-highlighting · GitHub

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

zsh-autosuggestions/INSTALL.md at master · zsh-users/zsh-autosuggestions · GitHub

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇