On Sat, Dec 04, 2021 at 12:19:34PM +0100, Richard Ulmer wrote:
> Hi all,
> I've been reading up on "advanced" less(1) features and came across the
> lesskey(1) man page. In the COMMAND SECTION of the page I read this:
>
> > The action is the name of the less action, from the list below.
>
> However I cannot see this list of available actions. The only thing
> similar I can find is the list of default commands with their actions.
> From this I can deduce some available actions, but I'm not sure if those
> are all the available actions. Maybe there are some actions that are not
> bound by default. I'm also missing a description of what the actions do
> (I don't know all the default less(1) commands off the cuff).
>
> Is the action list missing from the lesskey(1) man page, or am I
> misunderstanding something?
>
> Greetings,
> Richard Ulmer
>
hi.
the actions do indeed match those in the command list. whether there are
any undocumented ones, i don;t know. i suppose you'd have to go poking
in the source. the actions will roughly match those described in the
less(1) COMMANDS section. so for example in less(1):
d | ^D
Scroll forward n lines ...
and in lesskey(1):
d forw-scroll
^D forw-scroll
so leskey gives you the action names (if you want to change them), and less
describes what these actions do.
we could maybe make this clearer:
#command
\r forw-line
...
to sth like this:
#command action
\r forw-line
...
however we still import less. i'd want to make sure that's not stepping
on anyone's toes to make local changes.
jmc
No comments:
Post a Comment