Skip to content

Commit 12b6baf

Browse files
committed
Merge branch 'release/v2.2.2'
2 parents 6b2a3c4 + 6fe2b19 commit 12b6baf

File tree

3 files changed

+24
-8
lines changed

3 files changed

+24
-8
lines changed

README.org

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,24 @@ See the example below.
8888
$GetChildItemColorTable.File['Directory'] = "Blue"
8989

9090
# Change color for executables to Green
91-
ForEach ($Exe in $GetChildItemColorExtensions.ExecutableList) {
91+
ForEach ($Exe in $GetChildItemColorExtensions['ExecutableList']) {
9292
$GetChildItemColorTable.File[$Exe] = "Green"
9393
}
9494
#+end_src
95+
** Adding a new category
96+
One can create a new category and assign colors easily like the example below.
97+
#+begin_src powershell
98+
$GetChildItemColorExtensions['OfficeList'] = @(
99+
".docx",
100+
".pdf",
101+
".pptx",
102+
".xlsx"
103+
)
104+
105+
ForEach ($Extension in $GetChildItemColorExtensions['OfficeList']) {
106+
$GetChildItemColorTable.File.Add($Extension, "Green")
107+
}
108+
#+end_src
95109
** Customizing vertical space
96110
You can adjust the vertical spacing using =$Global:GetChildItemColorVerticalSpace=. Default is 1 (PowerShell's
97111
default is 2).
@@ -102,6 +116,8 @@ $Global:GetChildItemColorVerticalSpace = 1
102116
* Authors
103117
- [[http://github.com/joonro][Joon Ro]].
104118
* Changelog
119+
** v2.2.2
120+
- Add instructions about adding a new category.
105121
** v2.2.1
106122
- [[https://github.com/joonro/Get-ChildItemColor/pull/44][Fix uint32 error in cell width calculation]]. (Thanks to [[https://github.com/DanielCarmingham][DanielCarmingham]])
107123
- [[https://github.com/joonro/Get-ChildItemColor/pull/35][Add Chocolatey install instructions]]. (Thanks to [[https://github.com/pauby][pauby]])

src/Get-ChildItemColor.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
RootModule = 'Get-ChildItemColor.psm1'
1111

1212
# Version number of this module.
13-
ModuleVersion = '2.2.0'
13+
ModuleVersion = '2.2.2'
1414

1515
# Supported PSEditions
1616
# CompatiblePSEditions = @()

src/Get-ChildItemColorTable.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,27 +171,27 @@ $Global:GetChildItemColorTable = @{
171171
$GetChildItemColorTable.File.Add('Directory', "Blue")
172172
$GetChildItemColorTable.File.Add('Symlink', "Cyan")
173173

174-
ForEach ($Extension in $GetChildItemColorExtensions.CompressedList) {
174+
ForEach ($Extension in $GetChildItemColorExtensions['CompressedList']) {
175175
$GetChildItemColorTable.File.Add($Extension, "Red")
176176
}
177177

178-
ForEach ($Extension in $GetChildItemColorExtensions.ExecutableList) {
178+
ForEach ($Extension in $GetChildItemColorExtensions['ExecutableList']) {
179179
$GetChildItemColorTable.File.Add($Extension, "Green")
180180
}
181181

182-
ForEach ($Extension in $GetChildItemColorExtensions.TextList) {
182+
ForEach ($Extension in $GetChildItemColorExtensions['TextList']) {
183183
$GetChildItemColorTable.File.Add($Extension, "Yellow")
184184
}
185185

186-
ForEach ($Extension in $GetChildItemColorExtensions.DllPdbList) {
186+
ForEach ($Extension in $GetChildItemColorExtensions['DllPdbList']) {
187187
$GetChildItemColorTable.File.Add($Extension, "DarkGreen")
188188
}
189189

190-
ForEach ($Extension in $GetChildItemColorExtensions.ConfigsList) {
190+
ForEach ($Extension in $GetChildItemColorExtensions['ConfigsList']) {
191191
$GetChildItemColorTable.File.Add($Extension, "Gray")
192192
}
193193

194-
ForEach ($Extension in $GetChildItemColorExtensions.SourceCodeList) {
194+
ForEach ($Extension in $GetChildItemColorExtensions['SourceCodeList']) {
195195
$GetChildItemColorTable.File.Add($Extension, "DarkYellow")
196196
}
197197

0 commit comments

Comments
 (0)