ScepterZ
V2EX  ›  问与答

如何在 windows 上使用 zsh

  •  
  •   ScepterZ · Sep 3, 2020 · 4920 views
    This topic created in 2252 days ago, the information mentioned may be changed or developed.
    git for windows 配合 windows termainl 已经配的很完美了,可是还是想用 zsh
    试了搜到的方案,都没成功
    1 、git for windows sdk,zsh 里很卡,目录感觉映射的不对,乱七八糟,但是他的 bash 里是没事的
    2 、cygwin,安装 oh my zsh 失败,第一次装没效果,重试就提示文件已存在,但是对应的目录(在 cygwin 里)并不存在
    wsl 的两套东西会混,并且 wsl2 进 windows 的目录,git status 非常卡,网上的方法也不算完美,不想用 wsl
    Supplement 1  ·  Sep 3, 2020
    折腾了下 msys2,基本完美了,安装过程就是按照教程操作,需要根据自己需要修改 /etc/nsswitch.conf 和 path
    附上 Windows terminal 的配置
    {
    "guid": "{1c4de342-38b7-51cf-b940-2309a097f589}", // 唯一的标识,改成和其他的已有终端不一样
    "hidden": false,
    "name": "MSYS2",
    "acrylicOpacity": 0, // 透明度
    "closeOnExit": true, // 关闭的时候退出命令终端
    "colorScheme": "Konsolas", // 样式配置
    "commandline": "C:\\msys64\\msys2_shell.cmd -defterm -msys2 -no-start -here -full-path", // 重点就是要用这个脚本启动,以及他的参数
    "cursorColor": "#FFFFFF", // 光标颜色
    "cursorShape": "bar", // 光标形状
    "fontFace": "Fira Code", // 字体配置,选择你电脑上已安装的字体
    "fontSize": 11, // 终端字体大小
    "historySize": 9001, // 终端窗口记忆大小
    "icon": "C:\\msys64\\msys2.ico" // git 的图
    }
    13 replies  •  2020-09-07 12:11:06 +08:00
    Jirajine
    Jirajine
    Sep 3, 2020 via Android
    1
    msys2
    caskeep
    caskeep
    Sep 3, 2020 via iPhone
    2
    wsl2 windows 还真没折腾过
    ScepterZ
    ScepterZ
    OP
    Sep 3, 2020
    3
    @caskeep 那你试过在 windows 目录下(/mnt/c )的项目里 git status 之类的么,慢到怀疑人生,有相关 issue 了但是还没解决
    wangkun025
    wangkun025
    Sep 3, 2020
    4
    没法用。
    zhizunzz
    zhizunzz
    Sep 3, 2020
    5
    babun
    huaxianyan
    huaxianyan
    Sep 3, 2020
    6
    我是用 WSL1 配合 Windows Terminal 使用的,很爽
    ysc3839
    ysc3839
    Sep 3, 2020 via Android
    7
    我也建议试试 msys2,有 pacman 包管理器。遇到 msys2 源里面没有的包,去 Arch Linux 的源弄过来编译,一般不需要改动就可以成功编译。
    thedrwu
    thedrwu
    Sep 3, 2020 via Android
    8
    把文件系统挂成 nfs/samba,正着或者逆着都行。
    caskeep
    caskeep
    Sep 4, 2020 via iPhone
    9
    @ScepterZ #3 我用 vscode 不用 c 或者 d 盘 目录 windows 下都有问题吧
    whoisix
    whoisix
    Sep 6, 2020
    10
    楼主在输入的时候卡不,我这里卡卡的
    ScepterZ
    ScepterZ
    OP
    Sep 6, 2020
    11
    @whoisix 不卡,挺完美的
    whoisix
    whoisix
    Sep 6, 2020 via Android
    12
    @ScepterZ 没有像 wsl1 那样的卡顿感吗。是我安装版本不对吗?楼主看的哪篇教程
    ScepterZ
    ScepterZ
    OP
    Sep 7, 2020
    13
    @
    @whoisix 就简单的按照 msys2 的官方文档安装了下,windows terminal 按照贴出来的配置的,就没问题了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1558 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 23:29 · PVG 07:29 · LAX 15:29 · JFK 18:29
    ♥ Do have faith in what you're doing.