Skip to content

Switch to less -R for default pager #5758

@rjsocha

Description

@rjsocha

Bug Report

wp-cli use "less -r" command for pagination support (I thnik). The option "-r" is not availble for example in Alpine (busybox's less version).
Additionaly man for less states that:
"USE OF THE -r OPTION IS NOT RECOMMENDED."
Maybe this can be switched to option "-R". Which do quite the same in "standard" less. (in busybox works in reverse - ie. removes color codes). But ...

Sample output:

/ $ wp
less: unrecognized option: r
BusyBox v1.35.0 (2022-11-19 10:13:10 UTC) multi-call binary.

Usage: less [-EFIMmNSRh~] [FILE]...

View FILE (or stdin) one screenful at a time

        -E      Quit once the end of a file is reached
        -F      Quit if entire file fits on first screen
        -I      Ignore case in all searches
        -M,-m   Display status line with line numbers
                and percentage through the file
        -N      Prefix line number to each line
        -S      Truncate long lines
        -R      Remove color escape codes in input
        -~      Suppress ~s displayed past EOF

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions