Code Monkey home page Code Monkey logo

Comments (8)

joonro avatar joonro commented on July 29, 2024

Hi-

I cannot reproduce this as it is working in my machine (see the screenshot below). Are you using the latest version?

image

from get-childitemcolor.

joonro avatar joonro commented on July 29, 2024

Oops you meant they are not ordered correctly? With a quick look, I actually could not see what you are talking about --- could you please elaborate?

from get-childitemcolor.

zl3one6 avatar zl3one6 commented on July 29, 2024

Yes, I use the latest version. I think I didn't explain the issue correctly. I test a kind of scenario that there are a lot of folders with English name and Chinese name, and a lot of English name and Chinese name files. The picture shows the name of the folders and files are not aligned.
Snipaste_2019-08-16_16-26-56

from get-childitemcolor.

joonro avatar joonro commented on July 29, 2024

Oh I understand --- thanks for the elaboration. I think it must be that the character length calculation in Get-ChildItemColorFormatWide is broken for unicode characters, since I see this with Korean characters as well. Let me see if I can fix this quickly.

from get-childitemcolor.

joonro avatar joonro commented on July 29, 2024

It does not look like it would be easy to fix. The issue is for these characters, .Length method returns the character length, but in printing, these characters takes 2 spaces instead of 1. For example,

> "한글파일".Length
4

I will get back to this when I have more time. Sorry!

from get-childitemcolor.

zl3one6 avatar zl3one6 commented on July 29, 2024

That's great. Looking forward to the fix. Thanks!

from get-childitemcolor.

reli-msft avatar reli-msft commented on July 29, 2024

@joonro
You may need something like wcwidth. A reference could be this: https://github.com/timoxley/wcwidth

from get-childitemcolor.

joonro avatar joonro commented on July 29, 2024

This is fixed thanks to @shiena.

from get-childitemcolor.

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.