Fakerr / git-recall

An interactive way to peruse your git history from the terminal
MIT License
2.12k stars 47 forks source link

lesskey is not installed, #10

Closed darmalovan closed 7 years ago

darmalovan commented 7 years ago

I'm getting this error: abort: the program lesskey is not installed. Make sure to install it before running git-recall

How dow I install lesskey? can't seem to find a way to install it

marartner commented 7 years ago

Same issue here on Mac OS X, v10.11

smypf commented 7 years ago

http://apple.stackexchange.com/questions/27269/is-less1-missing-lesskey-functionality

tl;dr - brew install less

tjerkw commented 7 years ago

Even after installing less it stil doesnt work:

abort: the program lesskey is not installed. Make sure to install it before running git-recall

tjerkw commented 7 years ago

lesskey is disabled on the brew less mac. You have to build it from source... uninstalling git recall

Qix- commented 7 years ago

This module doesn't really need it. They're literally only using it to change key bindings in less, which is a pretty destructive thing anything (it sets stuff up in your home directory). Tbh, it shouldn't be messing with users' configurations at all. Uninstalling as this module is potentially dangerous.

Fakerr commented 7 years ago

@Qix- Not exactly. With lesskey you can define files with specific keys configuration without overriding default one. That's what I'm doing. I'm creating a temporary lesskey file, tell less (when it is used in git-recall) to use that file, and remove it after you're done. So there is actually no risk to mess up with default keybindings.

@tjerkw Did you try this brew install homebrew/dupes/less ?

Qix- commented 7 years ago

@Fakerr Why not use lesskey only if command -v returns with a 0 exit code?

if command -v lesskey &> /dev/null; then
    export HASLESSKEY=true
    # ... do lesskey stuff
fi
Fakerr commented 7 years ago

@Qix- I'm using the lesskey feature to enable users to use the Tab key when they want to leave the diff displayed with less, which is something you can't do with default less behavior (you have to press q). I did this to make the tool's workflow more consistent (always use Tab to expand/reduce the diff). So, I prefer that users have lesskey installed rather than having different behaviors according users set-up and thus avoid a lot of confusions.

milani commented 7 years ago

It is very common to use tab to navigate between items and press escape to close the list and continue typing. So people won't be disturbed with this UX.

Nevon commented 7 years ago

Rather than depending on lesskey, I would suggest letting the user decide by using the PAGER.

I'm not going to compile my own version of less just for this program, neat as it might be, and I'm perfectly okay with navigating my pager with the default key bindings, just like I do with every other application.

Fakerr commented 7 years ago

Since it was requested by many, lesskey is no longer mandatory to run the program. (Default less key bindings are used)

chrise86 commented 7 years ago

I know this was only closed 3 hours ago, but I just installed this and still got this error. Assuming an update has not been published to npm?

Fakerr commented 7 years ago

@chrise86 Ups, I forgot about that. I'll update it now. THanks :)

chrise86 commented 7 years ago

@Fakerr awesome thanks! Just to confirm, compiling manually works fine :)