如何修复已取消的修改,shell中未进行任何更改 [英] How can I fix Edit cancelled, no changes made in shell

查看:169
本文介绍了如何修复已取消的修改,shell中未进行任何更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我跑步

kubectl edit deployment

更改我的一个pod的版本(此命令在我的文本编辑器中打开一个临时文件,然后我通常编辑并关闭该临时文件),甚至在我关闭之前我的文本编辑器,我可以在bash中看到以下注释.

to change the version of one of my pods (this commands opens a temp file in my text editor and then I usually edit and close this temp file) and even before I close this temp file in my text editor I can see the following note in my bash.

Edit cancelled, no changes made.

在安装 fish 之前还可以,我尝试切换为 bash ,但这也无济于事.

It was OK before I installed fish and I tried to switch to bash but it doesn't help either.

我该如何解决?

推荐答案

这种情况很可能是因为它打开了一个分叉而不是停留的编辑器.

Things like this are most likely caused by it opening an editor that forks off instead of staying.

这意味着您需要将$ EDITOR设置为确实等待的编辑器.例如. nanovimemacs应该可以工作,例如如果您使用崇高的文字,则必须使用subl -w明确告诉它等待.

That means you'll want to set $EDITOR to an editor that does wait. E.g. nano, vim or emacs should work, and e.g. if you use sublime text you'll have to use subl -w to explicitly tell it to wait.

目前还不清楚您正在运行哪个shell.如果是bash,请运行export EDITOR="subl -w",在鱼中运行set -gx EDITOR subl -w(如果您使用fish< 3.0,则运行"subl -w".)

It's not quite clear which shell you're running at the moment. If it's bash, run export EDITOR="subl -w", in fish run set -gx EDITOR subl -w (or "subl -w" if you use fish < 3.0).

这篇关于如何修复已取消的修改,shell中未进行任何更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆