gwsw / less

Less - text pager
http://greenwoodsoftware.com/less
Other
561 stars 88 forks source link

less prints file change commands into file when specified on command line #552

Open rnkn opened 2 months ago

rnkn commented 2 months ago

less prints file change commands into file when specified on command line.

To Reproduce

  1. echo foo > foo; echo bar > bar
  2. less +2:x foo bar

Expected results

bar
~
~

Actual Results

 :xbar
~
~

Version

$ less --version
less 661 (PCRE2 regular expressions)
Copyright (C) 1984-2024  Mark Nudelman

less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Home page: https://greenwoodsoftware.com/less

Curiously this does not happen with OpenBSD less.

polluks commented 2 months ago

NetBSD fails also, at least ^L helps.

gwsw commented 2 months ago

Fixed in 469b79e191f4628d4972961b66c2b76c54e129c7 in the post659 branch.