From d34a90d2444c05c22c419736e11721178f792825 Mon Sep 17 00:00:00 2001 From: Paul Broadwith Date: Wed, 25 Mar 2020 09:57:22 +0000 Subject: [PATCH 1/4] Add Chocolatey install instructions --- README.org | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.org b/README.org index 1785402..a079800 100644 --- a/README.org +++ b/README.org @@ -45,6 +45,8 @@ After cloning the repo, you can put files in =/src= folder into =Get-ChildItemColor= folder under your =PSModulePath= (e.g., =$ENV:UserProfile\Documents\PowerShell\Modules= for PowerShell 6 and later). The =master= branch always contains the latest release version. +** Install from [[https://chocolatey.org][Chocolatey]] +The module is available as a [[https://chocolatey.org/packages/get-childitemcolor][Chocolatey package]]. Install it using =choco install get-childitemcolor=. * Usage When you import the module: From e50aabd82acb775ec80e05803b464c3fbbcbac6f Mon Sep 17 00:00:00 2001 From: Daniel Carmingham Date: Thu, 14 Apr 2022 09:43:04 -0400 Subject: [PATCH 2/4] Fix uint32 error in cell width calculation --- src/PSColorHelper.ps1 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/PSColorHelper.ps1 b/src/PSColorHelper.ps1 index 7b55074..13ac3ff 100644 --- a/src/PSColorHelper.ps1 +++ b/src/PSColorHelper.ps1 @@ -34,19 +34,19 @@ function LengthInBufferCells function LengthInBufferCell { param ([char]$Char) - # The following is based on http://www.cl.cam.ac.uk/~mgk25/c/wcwidth.c + # The following is based on https://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c # which is derived from https://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt [bool]$isWide = $Char -ge 0x1100 -and ($Char -le 0x115f -or # Hangul Jamo init. consonants $Char -eq 0x2329 -or $Char -eq 0x232a -or - ([uint32]($Char - 0x2e80) -le (0xa4cf - 0x2e80) -and - $Char -ne 0x303f) -or # CJK ... Yi - ([uint32]($Char - 0xac00) -le (0xd7a3 - 0xac00)) -or # Hangul Syllables - ([uint32]($Char - 0xf900) -le (0xfaff - 0xf900)) -or # CJK Compatibility Ideographs - ([uint32]($Char - 0xfe10) -le (0xfe19 - 0xfe10)) -or # Vertical forms - ([uint32]($Char - 0xfe30) -le (0xfe6f - 0xfe30)) -or # CJK Compatibility Forms - ([uint32]($Char - 0xff00) -le (0xff60 - 0xff00)) -or # Fullwidth Forms - ([uint32]($Char - 0xffe0) -le (0xffe6 - 0xffe0))) + ($Char -ge 0x2e80 -and $Char -le 0xa4cf -and + $Char -ne 0x303f) -or # CJK ... Yi + ($Char -ge 0xac00 -and $Char -le 0xd7a3) -or # Hangul Syllables + ($Char -ge 0xf900 -and $Char -le 0xfaff) -or # CJK Compatibility Ideographs + ($Char -ge 0xfe10 -and $Char -le 0xfe19) -or # Vertical forms + ($Char -ge 0xfe30 -and $Char -le 0xfe6f) -or # CJK Compatibility Forms + ($Char -ge 0xff00 -and $Char -le 0xff60) -or # Fullwidth Forms + ($Char -ge 0xffe0 -and $Char -le 0xffe6)) # We can ignore these ranges because .Net strings use surrogate pairs # for this range and we do not handle surrogage pairs. From 2e38aa21c7f0de15fbf85baef2a401bb6957f862 Mon Sep 17 00:00:00 2001 From: Joon Ro Date: Thu, 14 Apr 2022 10:37:10 -0700 Subject: [PATCH 3/4] Add v2.2.1 changelog --- README.org | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.org b/README.org index a079800..623083b 100644 --- a/README.org +++ b/README.org @@ -102,6 +102,9 @@ $Global:GetChildItemColorVerticalSpace = 1 * Authors - [[http://github.com/joonro][Joon Ro]]. * Changelog +** v2.2.1 +- [[https://github.com/joonro/Get-ChildItemColor/pull/44][Fix uint32 error in cell width calculation]]. (Thanks to [[https://github.com/DanielCarmingham][DanielCarmingham]]) +- [[https://github.com/joonro/Get-ChildItemColor/pull/35][Add Chocolatey install instructions]]. (Thanks to [[https://github.com/pauby][pauby]]) ** v2.2.0 - Fix #27, Display issue with Chinese. (Thanks to [[https://github.com/shiena][shiena]]) ** v2.1.1 From acbc6f588a41e8075b1c47f28b3b0871d9ccf2a8 Mon Sep 17 00:00:00 2001 From: Joon Ro Date: Thu, 14 Apr 2022 10:37:25 -0700 Subject: [PATCH 4/4] Minor change. --- README.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.org b/README.org index 623083b..0c524f7 100644 --- a/README.org +++ b/README.org @@ -8,7 +8,7 @@ by [[http://thepowershellguy.com/][the PowerShell Guy]], and [[https://github.co It provides two main functionalities: -1. Directly provide coloring outputs of ~Get-ChildItem~ by modifying +1. Directly provide coloring of ~Get-ChildItem~ output by modifying ~Out-Default~. Once the module is imported, ~Get-ChildItem~'s output will be automatically colored. It does support pipeline (e.g., ~Get-ChildItem | grep ".git"~). Also, now the directory name and the headers of its output