windows msys2 使用fish
pacman -S fish
如果打开msys2时候默认进的 windows/system msys64 的
home/usr/.config/fish:
if status is-interactive
# Commands to run in interactive sessions can go here
cd ~
end
然后把 msys64/msys2_shell.cmd 中 改成
set "LOGINSHELL=fish"
msys64/etc/nsswitch.confdb_shell: /bin/fish
windows terminal 也可以配置:
"commandline": "C:\\msys64\\msys2_shell.cmd -defterm -no-start -use-full-path -here -mingw64 -shell zsh",
-shell xxx 来指定 默认打开路径:"commandline": "C:\\msys64\\msys2_shell.cmd -defterm -no-start -use-full-path -here -where C:\\Users\\D1mo\\Desktop",
vscode 中切换默认终端
自己项目的 setings.json: "terminal.integrated.defaultProfile.windows": "fish (MSYS2)"
全局:
json
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [],
"icon": "terminal-cmd"
},
"Git Bash": {
"source": "Git Bash"
},
"MINGW64 / MSYS2": {
"path": "C:/msys64/msys2_shell.cmd",
"args": ["-defterm", "-here", "-no-start", "-mingw64"],
"icon": "terminal-bash",
"color": "terminal.ansiCyan",
"overrideName": true
},
"fish (MSYS2)": {
"path": "C:\\msys64\\usr\\bin\\fish.exe",
"args": ["--login", "-i"],
"env": {
"CHERE_INVOKING": "1"
}
}
},