mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2025-12-09 09:35:38 +00:00
whitespace cleanup
* makes changes to almost all main repo files to be in accordance with .editorconfig * some files in "test\fixtures\..." were left alone to avoid breaking tests * NOTE: whitespace changes *only* (`git diff -b` shows no changes)
This commit is contained in:
@@ -9,41 +9,41 @@ param($cmd)
|
||||
reset_aliases
|
||||
|
||||
function print_help($cmd) {
|
||||
$file = gc (command_path $cmd) -raw
|
||||
$file = gc (command_path $cmd) -raw
|
||||
|
||||
$usage = usage $file
|
||||
$summary = summary $file
|
||||
$help = help $file
|
||||
$usage = usage $file
|
||||
$summary = summary $file
|
||||
$help = help $file
|
||||
|
||||
if($usage) { "$usage`n" }
|
||||
if($help) { $help }
|
||||
if($usage) { "$usage`n" }
|
||||
if($help) { $help }
|
||||
}
|
||||
|
||||
function print_summaries {
|
||||
$commands = @{}
|
||||
$commands = @{}
|
||||
|
||||
command_files | % {
|
||||
$command = command_name $_
|
||||
$summary = summary (gc (command_path $command) -raw)
|
||||
if(!($summary)) { $summary = '' }
|
||||
$commands.add("$command ", $summary) # add padding
|
||||
}
|
||||
command_files | % {
|
||||
$command = command_name $_
|
||||
$summary = summary (gc (command_path $command) -raw)
|
||||
if(!($summary)) { $summary = '' }
|
||||
$commands.add("$command ", $summary) # add padding
|
||||
}
|
||||
|
||||
$commands.getenumerator() | sort name | ft -hidetablehead -autosize -wrap
|
||||
$commands.getenumerator() | sort name | ft -hidetablehead -autosize -wrap
|
||||
}
|
||||
|
||||
$commands = commands
|
||||
|
||||
if(!($cmd)) {
|
||||
"usage: scoop <command> [<args>]
|
||||
"usage: scoop <command> [<args>]
|
||||
|
||||
Some useful commands are:"
|
||||
print_summaries
|
||||
"type 'scoop help <command>' to get help for a specific command"
|
||||
print_summaries
|
||||
"type 'scoop help <command>' to get help for a specific command"
|
||||
} elseif($commands -contains $cmd) {
|
||||
print_help $cmd
|
||||
print_help $cmd
|
||||
} else {
|
||||
"scoop help: no such command '$cmd'"; exit 1
|
||||
"scoop help: no such command '$cmd'"; exit 1
|
||||
}
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user