linux - Git 命令执行(如 "git diff"或 "git help commit")返回关于 "sensible-paper"的错误

标签 linux git manpage

在我的 Xubuntu 14.04 系统上,我使用安装了 Git

sudo apt-get install git

它工作正常(我才刚刚开始学习它),但是执行

git diff

返回

error: cannot run sensible-paper: No such file or directory

作为它的第一行。在第一行之后,它给出了文件之间的差异,换句话说,一切正常。

此外,命令

man git

(或任何其他帮助命令,如 git help commit)返回:

man: can't execute sensible-paper: No such file or directory
man: command exited with status 255: (cd /home/max/Desktop/Git Learning && LESS=-ix8RmPm Manual page git-commit(1) ?ltline %lt?L/%L.:byte %bB?s/%s..?e (END):?pB %pB\%.. (press h for help or q to quit)$PM Manual page git-commit(1) ?ltline %lt?L/%L.:byte %bB?s/%s..?e (END):?pB %pB\%.. (press h for help or q to quit)$ MAN_PN=git-commit(1) sensible-paper)

因此我根本无法获得有关 Git 的任何帮助(从我的 shell)。 我用谷歌搜索了解决方案,但找不到与上述错误类似的任何内容。 任何帮助表示赞赏。

最佳答案

sensible-paper 显然是 sensible-pager 的错别字,应该是默认执行的pager。

要找出错误设置的环境变量,您可以运行

env | grep sensible-paper

无论如何要让 Git 使用 sensible-pager,运行

git config --global core.pager sensible-pager

关于linux - Git 命令执行(如 "git diff"或 "git help commit")返回关于 "sensible-paper"的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26524559/

相关文章:

php - 版本控制内容管理系统?

linux - 获取驱动程序功能的手册页

linux - 在 BSD 中禁用 snmpd 日志?

GitHub PR 显示没有差异,但文件不同

linux - 在 Windows 机器上安装 ubuntu 时出现问题

git - 如何解决 Flutter 上的 "Unable to find git in your PATH"?

c - 我在哪里可以获得有关 C 语言返回调用的说明/手册页?

syntax-error - 内置fc的手册页使用-而不是-作为选项

linux - %CPU 列和负载在顶部

linux - sudo apt-get install php5-cli 时出错