我正在使用新的windows 终端。
我刚刚安装了powershell v7.0.2和starship以使其更好。
我想编辑starship
配置,所以我运行了这个命令:
> starship.exe config
----------------------
Error: editor "vi" was not found. Did you set your $EDITOR or $VISUAL environment variables correctly?
Full error: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }
所以我继续编辑我$PROFILE
的设置visual studio code
为默认编辑器(code
在路径中):
> code $PROFILE
---------------
$ENV:EDITOR = "code"
$ENV:VISUAL = "code"
现在我得到了同样的错误,但是用code
而不是vi
:
> starship.exe config
----------------------
Error: editor "code" was not found. Did you set your $EDITOR or $VISUAL environment variables correctly?
Full error: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }
我最终运行的原因starship config
是因为在创建$HOME\.starship\starship.toml
配置文件后starship
忽略它,尽管我已经在我的配置文件中设置了路径:
> code $PROFILE
---------------
$ENV:STARSHIP_CONFIG = "$HOME\.starship"
所以我跑去starhip config
看看它期望的路径是什么config file
。
我也尝试将完整路径设置为visual studio code
in $EDITOR
,但没有帮助。