Coder Social home page Coder Social logo

Add indentation before filenames about lsd HOT 6 CLOSED

lsd-rs avatar lsd-rs commented on August 15, 2024
Add indentation before filenames

from lsd.

Comments (6)

Peltoche avatar Peltoche commented on August 15, 2024 1

The argument can be possible indeed. We only define the behavior in case of piped output (lsd --indent | wc -c for example). It seems many implementations disable this kind of feature in case of pipe in order to allow the following program to work properly.

I think the following would do the trick:

lsd --prefix-indent=never # never indent (by default)
lsd --prefix-indent=auto # only indent when the output is a tty
lsd --prefix-indent=always # always indent

What do you think of it?

from lsd.

alichtman avatar alichtman commented on August 15, 2024

As a sidenote, this is a ton faster than colorls. As soon as some more features are added, I'm going to make this my default ls command. Great work, @Peltoche.

from lsd.

Peltoche avatar Peltoche commented on August 15, 2024

Hello @alichtman,

Lsd is a little more than a simple rewrite as it aims to offer more features. That's why we can have some differences with the original colorls package. For the tabulation there is several opinions on this subject:

  • exa doesn't indent
  • colorls indent
  • ls doesn't indent
  • lsd doesn't indent

I think that it's a good idea to follow the classic ls as much as possible so I don't think lsd should implement this tabulation by default.

from lsd.

alichtman avatar alichtman commented on August 15, 2024

It would be cool to be able to set the indentation somehow.

I was thinking this could be an extra argument, like -indent. I would use it, but I agree that it shouldn't be enabled by default.

from lsd.

alichtman avatar alichtman commented on August 15, 2024

This seems to make sense, yeah. I think this is a good solution, but there may be a better one. I'll think about it some more and let you know if I come up with anything.

from lsd.

Peltoche avatar Peltoche commented on August 15, 2024

As there is no news I close this ticket. Feel free to reopen it if you want to propose your solution

from lsd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.