colorls icon indicating copy to clipboard operation
colorls copied to clipboard

Adding a flag for paging

Open wviechtb opened this issue 6 years ago • 2 comments

Description

When piping the output from colorls to more or less, the colors are lost and I see no way of retaining them. How about adding a flag to colorls directly that does paging when needed?

  • Relevant Issues : (none)
  • Relevant PRs : (none)
  • Type of issue :
    • [ ] Installation
    • [ ] Font-related
    • [x] Feature request
    • [ ] Bug in existing feature
    • [ ] Developer mode : Code quality / Tests / Documentation

wviechtb avatar Jan 01 '18 23:01 wviechtb

Hi @wviechtb,

I have prepared a PR which solves this issue, I think. See #228.

Once merged, you may use the --format option to enforce a specific layout and using the --color option (#227 merged yesterday) you may enforce colorization.

Together, these options enable you to use a pager of your choosing with colorls:

colorls --color --format=horizontal | less --tabs=4 -RFX

avdv avatar Oct 20 '18 09:10 avdv

This is great! Looking forward to try it out.

wviechtb avatar Oct 25 '18 10:10 wviechtb