top image
home  /  pages  /  tech tips  /  contact about

Fix backspace in less

Problem

Backspace in less (in Linux) is broken: it shows a ^H character.

Keywords

Less, backspace, delete, lesskey.

Solution

Create the following file, and follow its instructions:
# call this file ~/.lesskey-in and run:
# lesskey -o ~/.lesskey ~/.lesskey-in
# and define variable LESSKEY to point to ~/.lesskey

#line-edit
^H      backspace
URL: https://thomer.com/howtos/backspace_in_less.html
Copyright © 1994-2022 by Thomer M. Gil
Updated: 2004/10/22