Skip to content

Commit 962bd84

Browse files
committed
♻️ Define commands as array
1 parent 642c98a commit 962bd84

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/commands.ps1

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
. $PSScriptRoot\options.ps1
22
. $PSScriptRoot\subCommands.ps1
33

4-
Set-Variable -Name cmds -Value @(
4+
Set-Variable -Name commands -Value @(
55
'add',
66
'audit',
77
'autoclean',
@@ -46,15 +46,3 @@ Set-Variable -Name cmds -Value @(
4646
'workspace',
4747
'workspaces'
4848
)
49-
$commands = [ordered] @{ }
50-
51-
$cmds | ForEach-Object {
52-
$commands[$_] = @{}
53-
54-
if ($options[$_]) {
55-
$commands[$_]['options'] = $options[$_]
56-
}
57-
if ($subCommands[$_]) {
58-
$commands[$_]['subCommands'] = $subCommands[$_]
59-
}
60-
}

0 commit comments

Comments
 (0)