It seems that the -F flag to less is broken. Instead of reverting to
cat-like behaviour on short files, it prints nothing at all.

  : lyndon@orthanc:/home/lyndon; cat typescript                                 
 
  Script started on Mon May  9 00:22:41 2022
  : lyndon@orthanc:/home/lyndon; seq 10 > numbers
  : lyndon@orthanc:/home/lyndon; cat numbers
  1
  2
  3
  4
  5
  6
  7
  8
  9
  10
  : lyndon@orthanc:/home/lyndon; less -F numbers
  : lyndon@orthanc:/home/lyndon; ^D
  
  Script done on Mon May  9 00:22:58 2022

OpenBSD orthanc.ca 7.1 GENERIC.MP#465 amd64

This is with TERM=xterm. If I set TERM=vt100, it works.  This seems
to relate to some long-standing oddities I've noticed with the
'xterm' terminfo definition OpenBSD uses.  In particular, programs
like man always switch to the alternate screen buffer when displaying
output, then switch back afterwards.  I find this very annoying so
I always compile my own terminfo definition for 'xterm', which works
everyplace else but not on OpenBSD.

I've tried poking into this a few times, but I just don't have the
energy to dive into the guts of curses.  Has anyone else run into
this, and maybe have some suggestions on where to start digging?

Here's the terminfo definition I use, FWIW:

# An xterm without the internal screen memory buffer.  This variant
# does not save/restore the screen when running termcap based applications.
# This means the man page you were reading doesn't disappear from the screen
# when you quit the pager.
xterm|vs100|xterm terminal emulator,
        am, xenl, km, mir, msgr,
        cols#80, it#8, lines#65,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, cr=^M, csr=\E[%i%p1%d;%p2%dr, tbc=\E[3g,
        clear=\E[H\E[2J, el1=\E[1K$<3>, el=\E[K, ed=\E[J,
        cup=\E[%i%p1%d;%p2%dH, cud1=^J, home=\E[H, cub1=^H,
        cuf1=\E[C, cuu1=\E[A, dch1=\E[P, dl1=\E[M, enacs=\E(B\E)0,
        smacs=^N, blink=\E[5m, bold=\E[1m, rev=\E[7m, smso=\E[7m,
        smul=\E[4m, rmacs=^O, sgr0=\E[m, rmso=\E[m, rmul=\E[m,
        ich1=\E[@, il1=\E[L, ka1=\EOq, ka3=\EOs, kb2=\EOr, kbs=^H,
        kc1=\EOp, kc3=\EOn, kcud1=\EOB, kent=\EOM, kf0=\E[21~,
        kf1=\E[11~, kf10=\EOx, kf2=\E[12~, kf3=\E[13~, kf4=\E[14~,
        kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
        kcub1=\EOD, kcuf1=\EOC, kcuu1=\EOA, rmkx=\E[?1l\E>,
        smkx=\E[?1h\E=, dch=\E[%p1%dP, dl=\E[%p1%dM,
        cud=\E[%p1%dB, ich=\E[%p1%d@, il=\E[%p1%dL,
        cub=\E[%p1%dD, cuf=\E[%p1%dC, cuu=\E[%p1%dA,
        rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H, rs2=@,
        rc=\E8, sc=\E7, ind=^J, ri=\EM,
        
sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;,
        hts=\EH, ht=^I,


--lyndon

Reply via email to