问题描述
我在 emacs 中完成我所有的终端工作,并且更喜欢使用更丰富的工具来移动输出而不是less".更糟糕的是,任何时候应用程序在 emacs 中翻页,都会非常烦人,因为它是一个哑终端.
I do all of my terminal work in emacs and would prefer to use the much richer tools for moving around the output than "less". Worse, any time an applications pages inside of emacs, it is horribly annoying because it is a dumb terminal.
虽然我可以将诸如git help rm"之类的内容替换为M-x man git-rm",但我更愿意仅禁用 git 中所有内容的所有分页.这样我就不用去寻找正确的咒语了.
While I can swap things like "git help rm" for "M-x man git-rm", I would prefer to just disable all paging of everything in git. Then I don't have to hunt for the right incantations.
git config --global core.pager cat
似乎不能解决问题.
git config --global man.viewer "man -P cat"
导致问题,因为man -P cat"不是有效的可执行文件.
causes problems because "man -P cat" isn't a valid executable.
我怎样才能让 git 转储它的输出?
How can I get git to just dump its output?
推荐答案
通过阅读 git help
联机帮助页,您似乎应该能够
From reading the git help
manpage it looks like you should be able to
git config --global man.viewer catman
git config --global man.catman.cmd "man -P cat"
man.viewer
配置值是一个工具名称,而不是(部分)命令行.然后man.catman.cmd
给出用于catman
工具的命令.
The man.viewer
config value is a tool name, not a (partial) command line. Then man.catman.cmd
gives the command to use for the catman
tool.
似乎将 core.pager
设置为 cat
应该可以解决其他所有问题.
It seems like setting core.pager
to cat
should take care of everything else.
这篇关于在 git 中禁用所有分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!