Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Git’s single-key setting not work?

Tags:

git

I’m using Git 2.7.4. I have the following snippet in my ~/.config/git/config file:

[interactive]
    singleKey = true

However, when I run git add -p I still have to press enter after having made a choice for a hunk. What could be the cause for this?

like image 659
Wolfgang Jeltsch Avatar asked Jan 28 '23 21:01

Wolfgang Jeltsch


1 Answers

According to git-config documentation interactive.singleKey option requires the Perl module Term::ReadKey installed to work properly. Please check if this module is installed on your system and if not, install it using apropriate command. E.g. on linux systems, it would be:

sudo cpan Term::ReadKey
like image 65
running.t Avatar answered Feb 07 '23 08:02

running.t