Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot navigate with arrows in terminal on macOS #3

Closed
kevinquillen opened this issue Jan 16, 2017 · 6 comments
Closed

Cannot navigate with arrows in terminal on macOS #3

kevinquillen opened this issue Jan 16, 2017 · 6 comments

Comments

@kevinquillen
Copy link

kevinquillen commented Jan 16, 2017

Installed git-hlog by copying the script to /usr/local/bin and chmod u+x on it.

The command works,

Navigated to a folder with a git repo with history, typed:

git hlog -d 10

It shows me commits from the last 10 days. However, there is a warning at the top of the output:

/usr/local/bin/git-hlog: line 134: lesskey: command not found

I cannot navigate down the commits with the arrow keys whatsoever. On top of that, hitting tab expands the commit but overlaps everything in the window (zsh or bash exhibit the same behavior in the vanilla Terminal app on mac).

Quitting out prints this to terminal:

rm: /Users/kevinquillen/.lsh_less_keys_tmp: No such file or directory

Doing which lesskey results in lesskey not found which is likely why this isn't working for me at the moment.

Looks like a great tool otherwise and would love to get this working!

@kevinquillen
Copy link
Author

Looks like OSX does not ship with the lesskey option for less. Following this post, I ran

brew install homebrew/dupes/less

Now I do not get either error stated above, but I still cannot navigate commits with arrow keys, and tab expands and overwrites the existing window instead of expanding below the prompt.

@Fakerr
Copy link
Owner

Fakerr commented Jan 16, 2017

Hey Kevin, thanks for reporting the issues.

Concerning the tab expands, right now the script cannot handle the case where the sum of lines between the commits and a commit's diff is higher than the terminal screen. For that case, I'm using the less command to display the diff in a separate screen (I recognize that it is a sort of limitation and it makes the tool less nicer but I'm trying to figure out a way to get rid of less but it's not that trivial ...). Actually, I should have precised that in the README to avoid confusions.

For the arrow keys problem, I need your help here. Can you tell me which term are you using ? (echo $TERM).

@kevinquillen
Copy link
Author

xterm-256color

@Fakerr
Copy link
Owner

Fakerr commented Jan 16, 2017

Hmm, not sure why it's not working. Can you update the script you installed with the latest version and try to use j and k to navigate the list ? I wanna see if it's related to the arrow keys ansi code and not from something else. Thanks.

@oguzkonya
Copy link

I had the same issue, and applied the less fix. And I confirm that arrow keys do not work, but j and k keys work.

Cheers

@Fakerr
Copy link
Owner

Fakerr commented Jun 11, 2017

Issue resolved with Bash 4.3 or >

@Fakerr Fakerr closed this as completed Jun 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants