history | vim 不行?

2016 年 6 月 9 日
 luofeiyu

history > vim
history | vim
都不能让我编辑历史记录,为何?

4266 次点击
所在节点    程序员
12 条回复
7jmS8834H50s975y
2016 年 6 月 9 日
history | vim -
caiych
2016 年 6 月 9 日
history | vim -
skydiver
2016 年 6 月 9 日
23333
luofeiyu
2016 年 6 月 9 日
man vim 得到结果

- The file to edit is read from stdin. Commands are read
from stderr, which should be a tty.

The file to edit is read from stdin. 这个我懂了,请问
Commands are read from stderr, which should be a tty.
这个如何理解?
skydiver
2016 年 6 月 9 日
Kirscheis
2016 年 6 月 9 日
谜之喜感
yougg
2016 年 6 月 9 日
vi ~/.bash_history
audi
2016 年 6 月 9 日
还有人想编辑操作历史 无语
aias
2016 年 6 月 9 日
厉害
vitovan
2016 年 6 月 9 日
是的, VIM 做不到这一点。

安装 Emacs ,然后执行:

emacs ~/.bash_history
jackal
2016 年 6 月 10 日
@audi
给你说一个这样的应用场景(编辑历史操作命令的理由)

做了一件事情, 都是用命令来完成的,现在想写个 readme ,来告诉别人这个事情完成需要依次敲入的命令。
这个时候,打开 history ,然后编辑,删掉不必要的,重新组织命令。

整理好之后就是 readme ,这个就是用处。
mengzhuo
2016 年 6 月 10 日
家目录下有个 history 文件啊

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://study.congcong.us/t/284612

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX