Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rnkn opened this issue Aug 1, 2024 · 2 comments
Open

Comments

@rnkn
Copy link

rnkn commented Aug 1, 2024

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
Copy link
Contributor

polluks commented Aug 2, 2024

NetBSD fails also, at least ^L helps.

gwsw added a commit that referenced this issue Aug 3, 2024
Was missing calls to cmd_exec() before executing some commands.
This is necessary to clear the string on the command line.
Related to #552.
@gwsw
Copy link
Owner

gwsw commented Aug 3, 2024

Fixed in 469b79e in the post659 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants