[英]Git commands execution (like “git diff” or “git help commit”) returns errors about “sensible-paper”
On my Xubuntu 14.04 system I've installed Git using 在我的Xubuntu 14.04系统上,我安装了Git
sudo apt-get install git
It's working all right (I'm only starting to learn it), but execution of 它工作正常(我只是开始学习它),但执行
git diff
returns 回报
error: cannot run sensible-paper: No such file or directory
as its first line. 作为它的第一线。 After the first line it gives the differences between the files, in other words, works all right.
在第一行之后,它给出了文件之间的差异,换句话说,它可以正常工作。
Furthermore, command 此外,命令
man git
(or any other help commands, like git help commit
) returns: (或任何其他帮助命令,如
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)
And so I can't get any help on Git at all (from my shell). 所以我根本无法获得任何关于Git的帮助(来自我的shell)。 I've Googled for solution, but couldn't find anything similar to the above errors.
我用Google搜索了解决方案,但找不到与上述错误类似的内容。 Any help appreciated.
任何帮助赞赏。
sensible-paper
is clearly a typo for sensible-pager
, which should be the pager executed by default. sensible-paper
显然是sensible-pager
的错字,应该是默认执行的寻呼机。
To find out which environment variable is mis-set, you can run 要找出错误设置的环境变量,您可以运行
env | grep sensible-paper
To ask Git to use sensible-pager anyway, run 无论如何要让Git使用sensible-pager,运行
git config --global core.pager sensible-pager
It is a ranger problem.DEFAULT_PAGER value is misspelled: https://bugs.launchpad.net/ubuntu/+source/ranger/+bug/1331444 . 这是一个游侠问题.DEFAULT_PAGER值拼写错误: https : //bugs.launchpad.net/ubuntu/+source/ranger/+bug/1331444 。
Change sensible-paper
to sensible-pager
in the foloowing files: 在相应的文件中将
sensible-paper
改为sensible-pager
页面:
/usr/share/ranger/ranger/ext/rifle.py:23:DEFAULT_PAGER = 'sensible-paper'
/usr/share/ranger/ranger/__init__.py:27:DEFAULT_PAGER = 'sensible-paper'
/usr/share/ranger/rifle:23:DEFAULT_PAGER = 'sensible-paper'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.