Nnn: Nothing happens when pressing help key (big terminal, less pager with -F option)

Created on 30 Nov 2018  Â·  16Comments  Â·  Source: jarun/nnn

Pressing ? (SHIFT+,) or D does nothing.

Most helpful comment

FWIW, I encountered the same problem. In my environment setup, I had the less options set as LESS=-iRFXMx4. It's the F that creates the problem with displaying the help from nnn. I just got rid of it and now I see the help (instead of it just showing up in my scroll history after quitting nnn).

All 16 comments

fr == french?

And which shortcut is SHIFT+,?

I don't know French so you'll have to help yourself here. Compile nnn in debug mode (make debug) and the keycode will be printed here:

https://github.com/jarun/nnn/blob/master/src/nnn.c#L1051

The ascii code of ? shouldn't change but see what you find for these keys.

Ok. In fact it works when my terminal (tilix) is not full screen.
So it is not a problem of the key but a problem of integration between nnn, the terminal and the pager…

I tried with xterm and I have the same problem.

Pressing ? I sometime see the help flashing very briefly.

Ok, I found the problem.
It comes from my environment LESS variable being set to -FSRXIj.2. Unsetting it before launching nnn works perfectly as expected.
More precisely the -F which causes less to automatically exit if the entire file can be displayed on the first screen is the cause of the problem.

I'll rename the issue accordingly in order to help user with the same problem an I'll close it. Thanks for nnn and for the help.

Awesome! Many thanks!

@matclab I have added support for 1 env var combination for PAGER, LESS and SHELL on latest master.

So now (on fish shell) I can run:

env PAGER='less -FSRXIj.2' nnn

I have the same issue, I tried both kitty & alacritty & my $PAGER is set to less only. I'm running macOS Mojave 10.14.2

Please try master.
Also, if it doesn't work please try to debug yourself. Debugging local env specific issues is too taxing for the bandwidth we have. Thanks for your understanding.

@jarun tried master, same issue.

I'm fine trying to debug this myself. Any pointers/guide how to do it locally though?

Use the debug build 'make debug'

add logs. the debug log filr would be in /tmp/nnndbg

One thing I forgot to mention, that when I quit nnn after trying ? multiple times, is that the help is already printed n times in the commandline. Where n is the number of times I clicked ? inside nnn.

Anyway that's what I did to debug, not sure if I missed anything.

Steps:

  • make debug
  • Open nnn
  • type ? to get help _(2-3 times)_
  • quit

logfile

dents=0x7fb94c95a200
pnamebuf=0x7fb94d000000
ts2.tv_nsec - ts1.tv_nsec=421000
fname=
cur=0
path=/private/tmp/nnn
c=-1
cur=0
path=/private/tmp/nnn
c=63
ts2.tv_nsec - ts1.tv_nsec=227000
fname=nnn.dSYM
cur=0
path=/private/tmp/nnn
c=63
ts2.tv_nsec - ts1.tv_nsec=181000
fname=nnn.dSYM
cur=0
path=/private/tmp/nnn
c=63
ts2.tv_nsec - ts1.tv_nsec=124000
fname=nnn.dSYM
cur=0
path=/private/tmp/nnn
c=63
ts2.tv_nsec - ts1.tv_nsec=121000
fname=nnn.dSYM
cur=0
path=/private/tmp/nnn
c=-1
cur=0
path=/private/tmp/nnn
c=113

FWIW, I encountered the same problem. In my environment setup, I had the less options set as LESS=-iRFXMx4. It's the F that creates the problem with displaying the help from nnn. I just got rid of it and now I see the help (instead of it just showing up in my scroll history after quitting nnn).

@fintelkai just tried & I confirm that it fixed the issue. Thanks!

So 2 years passed and I missed this! I will add this in the troubleshooting section of the Wiki!

Thanks @fintelkai for following up!

Ahh OK. I see I chose to ignore as I suspected local environment issues. Anyway, I will add this in the Wiki.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lenormf picture lenormf  Â·  6Comments

akimdi picture akimdi  Â·  5Comments

Wuzado picture Wuzado  Â·  9Comments

kuntau picture kuntau  Â·  3Comments

tim77 picture tim77  Â·  9Comments