我在 Windows 电脑上使用 git 版本 2.7.0.windows.1,我使用了以下命令:
$ nano README
结果我:
bash: nano: command not found
现在如何将 Nano 文本编辑器安装到 git bash?
对之前的解决方案(@Simopaa)进行一点修改就可以在 Windows 10 上为我工作(没有 Chocolatey):
- 下载nano-git https://www.nano-editor.org/dist/win32-support/
移动nano-git-xxx.exe
到(例如)C:\Program Files\Git\bin
.
-
修改.gitconfig
文件包含以下内容(single and 双引号是重要的):
[core]
editor = "winpty '/c/Program Files/Git/bin/nano-git-0d9a7347243.exe'"
-
(可选步骤)制作nano
一般可用于编辑:
创建或编辑 bash 的启动脚本之一(例如~/.bash_profile
) 具有以下内容:
export PATH="/c/Program Files/Git/bin:$PATH"
alias nano="winpty nano"
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)