禁用git中的所有分页 [英] Disable all paging in git

查看:102
本文介绍了禁用git中的所有分页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在emacs中完成所有的终端工作,并希望使用更丰富的工具来移动输出,而不是少。更糟糕的是,任何时候,emacs内的应用页面,这是非常讨厌的,因为它是一个哑的终端。



虽然我可以将git help rm替换为M-x man git-rm,但我宁愿只禁用git中的所有页面。然后我不必寻找正确的咒语。

  git config --global core.pager cat 

似乎没有办法。

  git config --global man.viewerman -P cat

导致问题,因为man -P cat不是有效的可执行文件。



我如何获取git来转储其输出?

解决方案

从阅读 git help 手册页看起来应该能够

  git config --global man.viewer catman 
git config --global man.catman.cmdman -P cat

man.viewer 配置值是一个工具名称,而不是(部分)命令行。然后 man.catman.cmd 给出了用于 catman 工具的命令。



似乎设置 core.pager cat 应该照顾一切。 / p>

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.

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

Doesn't seem to do the trick.

  git config --global man.viewer "man -P cat"

causes problems because "man -P cat" isn't a valid executable.

How can I get git to just dump its output?

解决方案

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"

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.

It seems like setting core.pager to cat should take care of everything else.

这篇关于禁用git中的所有分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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