@@ -46,8 +46,18 @@ function FileInfo {
46
46
$global :PSColor.File.Code.Pattern , $regex_opts )
47
47
$executable = New-Object System.Text.RegularExpressions.Regex(
48
48
$global :PSColor.File.Executable.Pattern , $regex_opts )
49
+ $machine = New-Object System.Text.RegularExpressions.Regex(
50
+ $global :PSColor.File.Machine.Pattern , $regex_opts )
49
51
$text_files = New-Object System.Text.RegularExpressions.Regex(
50
52
$global :PSColor.File.Text.Pattern , $regex_opts )
53
+ $image_files = New-Object System.Text.RegularExpressions.Regex(
54
+ $global :PSColor.File.Image.Pattern , $regex_opts )
55
+ $audio_files = New-Object System.Text.RegularExpressions.Regex(
56
+ $global :PSColor.File.Audio.Pattern , $regex_opts )
57
+ $video_files = New-Object System.Text.RegularExpressions.Regex(
58
+ $global :PSColor.File.Video.Pattern , $regex_opts )
59
+ $office_files = New-Object System.Text.RegularExpressions.Regex(
60
+ $global :PSColor.File.Office.Pattern , $regex_opts )
51
61
$compressed = New-Object System.Text.RegularExpressions.Regex(
52
62
$global :PSColor.File.Compressed.Pattern , $regex_opts )
53
63
@@ -76,10 +86,30 @@ function FileInfo {
76
86
elseif ($executable.IsMatch ($file.Name ))
77
87
{
78
88
Write-Color - LS $global :PSColor.File.Executable.Color $file
89
+ }
90
+ elseif ($machine.IsMatch ($file.Name ))
91
+ {
92
+ Write-Color - LS $global :PSColor.File.Machine.Color $file
79
93
}
80
94
elseif ($text_files.IsMatch ($file.Name ))
81
95
{
82
96
Write-Color - LS $global :PSColor.File.Text.Color $file
97
+ }
98
+ elseif ($image_files.IsMatch ($file.Name ))
99
+ {
100
+ Write-Color - LS $global :PSColor.File.Image.Color $file
101
+ }
102
+ elseif ($audio_files.IsMatch ($file.Name ))
103
+ {
104
+ Write-Color - LS $global :PSColor.File.Audio.Color $file
105
+ }
106
+ elseif ($video_files.IsMatch ($file.Name ))
107
+ {
108
+ Write-Color - LS $global :PSColor.File.Video.Color $file
109
+ }
110
+ elseif ($office_files.IsMatch ($file.Name ))
111
+ {
112
+ Write-Color - LS $global :PSColor.File.Office.Color $file
83
113
}
84
114
elseif ($compressed.IsMatch ($file.Name ))
85
115
{
@@ -89,4 +119,4 @@ function FileInfo {
89
119
{
90
120
Write-Color - LS $global :PSColor.File.Default.Color $file
91
121
}
92
- }
122
+ }
0 commit comments