Open scoiatael opened 7 years ago
A clone/reimplementation that actually colorizes ls output instead of reimplementing ls would be interesting!
@torarnv - Yes, but parsing ls
is a discouraged approach. Hence, blindly colorizing ls
output isn't done (it used to be like this, till commit 64d256efaded062efd7fede74807663400716b46). 😄
@scoiatael - There has been similar discussions (about clones) in issue #11 for a Python clone and with @sl regarding a JS clone which is installable by npm. However, all these were prior to colorls
becoming a gem. :-/
This is (was) the architecture discussed by @sl and myself, regarding maintaining clones with a set of shared icons -
colorls (organization)
- colorls-icons repo # Acts as git submodule to all clones.
- colorls-ruby repo # The `colorls` ruby gem
- colorls-js # To be done by @sl
- colorls-python # Because Pythonists love a python implementation
...
However, an organization for colorls
with clones in multiple languages seems like a bit of an overkill to me at this point of time, especially when it's installation is as simple as gem install colorls
. But, let me know if you're fine with this / have a better alternative in mind. 😄
Yes, organization seems like a total overkill ;)
I agree that gem install colorls
is simple enough, but it starts becoming problematic if:
The major advantage of compiled languages vs interpreted (like Ruby, Python or JS) here is that you can compile it to one binary with as little dependencies as possible and then distribute it very easily.
I don't have any good proposal in mind (yet) - I guess the best possible solution would be to check if Crystal can compile this project without major changes - but I doubt it.
I guess for now I'll just play around with Rust clone, make it compatible with colorls
configuration files, and see if I can make it easily distributable as binary.
We can come back to this discussion after I have some results in Rust - is that ok?
Here's repo: https://github.com/scoiatael/colorls-rs
@athityakumar I see, hmmm. I was hoping to alias ls=colorls
😢
@scoiatael have you had a look at exa? It is a very feature-rich colorful ls replacement written in rust.
Ha, no, I have not. Nice, thank you @GladOSkar :) Maybe adding icon support there would be a good next step then?
Here's my javascript port for reference in case as we're considering how to best reduce redundancy seeing one of the implementations is useful. I look forward to seeing your rust implementation as well if you end up going that route!
Reason: distributing executable as Ruby gem is notoriously hard to pull off.
Would it be ok if I tried cloning this idea (awesome one, btw) in Golang / Rust / Crystal / Haskell? Basically, any compiled language in which you can simply distribute binaries for different OSes.