athityakumar/colorls

colorls with more than zero file gives output with extra newlines

craigemery opened this issue · 3 comments

Description

If I run
$ colorls
i.e. with no arguments, all the files are listed with no blank lines.

If I run
$ colorls *.ext
Then the files are all listed with an extra newline between each one.
This feels wrong.

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

I see this on macOS and Windows WSL.
colorls --version is 1.4.2

In fact colorls always shows a blank line, but when calling
$ colours
i.e. by itself, there's only one blank line & it's immediately before my prompt appears.
So it's just really noticeable when the blank line appears after every individually specified file.

avdv commented

Hi, thanks for bringing this up again!

This is basically a known bug which is not easy to fix since the current code structure revolves around the concept of processing each command line argument in separation (especially in regard to the --report option which prints a report after each argument).

What should be done instead is group all arguments into files and directories. Print all file arguments as one group and then print every directory as subsequent groups.

avdv commented

Duplicate of #233