-
Notifications
You must be signed in to change notification settings - Fork 0
/
tuliPS.psm1
75 lines (51 loc) · 1.97 KB
/
tuliPS.psm1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<#
,---------. ___ _ .---. .-./`) .-------. .-'''-.
\ \.' | | | | ,_| \ .-.')\ _(`)_ \ / _ \
`--. ,---'| .' | |,-./ ) / `-' \| (_ o._)| (`' )/`--'
| \ .' '_ | |\ '_ '`) `-'`"`| (_,_) /(_ o _).
:_ _: ' ( \.-.| > (_) ) .---. | '-.-' (_,_). '.
(_I_) ' (`. _` /|( . .-' | | | | .---. \ :
(_(=)_) | (_ (_) _) `-'`-'|___ | | | | \ `-' |
(_I_) \ / . \ / | \| | / ) \ /
'---' ``-'`-'' `--------`'---' `---' `-...-'
#>
<#
___
/ __| ___ _ _ _ _ __ ___
\__ \/ _ \ || | '_/ _/ -_)
|___/\___/\_,_|_| \__\___|
#>
foreach ($folder in 'Public', 'Internal', 'Classes') {
$folderPath = Join-Path $PSScriptRoot $folder
if (Test-Path $folderPath) {
$files = Get-ChildItem -Path $folderPath -Filter '*.ps1'
foreach ($file in $files) {
. $file.FullName
}
}
}
<#
__ __ _ _ _
\ \ / /_ _ _ _(_)__ _| |__| |___ ___
\ V / _` | '_| / _` | '_ \ / -_|_-<
\_/\__,_|_| |_\__,_|_.__/_\___/__/
#>
$ConfigPath = Join-Path $PSScriptRoot tuliPS.config.psd1
$Tulips = Import-PowerShellDataFile $ConfigPath
$OutDefault = Get-Command Out-Default -CommandType Cmdlet
$TypeTracker = @{
'System.IO.FileSystemInfo' = { Format-FileInfo $_ }
'Microsoft.PowerShell.Commands.MatchInfo' = { Format-MatchInfo $_ }
}
$TypeTrackerCheckpoint = $TypeTracker.Clone()
$NewProcess = Get-ProcessBlock
<#
___ _
/ __|___ _ __ _ __ __ _ _ _ __| |___
| (__/ _ \ ' \| ' \/ _` | ' \/ _` (_-<
\___\___/_|_|_|_|_|_\__,_|_||_\__,_/__/
#>
Invoke-Wrapper
$MyInvocation.MyCommand.ScriptBlock.Module.OnRemove = {
Reset-OutDefault
}