无法执行 vi vim 和 gedit 的编辑器

Ast*_*pta 1 git vim

当我尝试执行此操作时收到以下错误消息

git rebase -i <commit no.>

Unknown option -w
Run 'gedit --help' to see a full list of available command line options.
Could not execute editor
Run Code Online (Sandbox Code Playgroud)

从堆栈溢出的其他帖子中,我尝试了以下内容:

  1. 将默认编辑器更改为 vim,将路径指定为 /usr/bin/vim
  2. 对 vi 和 gedit 做了同样的事情

加载~/.zshrc使用source ~/.zshrc但仍然遇到同样的问题。

我还能尝试什么来消除这个错误。

pfn*_*sel 5

shell 的编辑器由

export EDITOR=vim
Run Code Online (Sandbox Code Playgroud)

要在您的 中设置编辑器gitconfig,可以使用

git config --global core.editor vim
Run Code Online (Sandbox Code Playgroud)