当文章写得比较长而且某次改动比较大的时候,使用 git diff
就必须 enter 多次才能够看完,或者我们可以选择 Ctrl + C
来终止当前进程。
但是无论我们选择上面两种方式中的哪一个都会遇到这个麻烦:我们不能再正常地输入命令了。
解决之道
使用 Q 退出
使用Q退出之后一切正常关于这里面的具体原理我没有查找过,待有空时候翻翻手册,如果恰好哪位读者知晓的,烦请告诉我,谢谢。
Solve the problem by myself
Here is a reflink 1.1.1.1. 命令diff用于比较两个文本文件或目录的差异. diff
was used by Linus Torvalds to manage the source code of Linux kernel before he event git
. If you are familiar with diff
in linux command line, you will be very confident to quit comparision with q
. Before you quit, any command is negleted, 'cause you're not working in "Terminal", the window is just an output device accepting no commands, but you can try !<command>
(ref: 1.2.11. 无处不在的分页器).
网友评论