diff options
author | Matth?us G. Chajdas <dev@anteru.net> | 2019-11-10 13:56:53 +0100 |
---|---|---|
committer | Matth?us G. Chajdas <dev@anteru.net> | 2019-11-10 13:56:53 +0100 |
commit | 1dd3124a9770e11b6684e5dd1e6bc15a0aa3bc67 (patch) | |
tree | 87a171383266dd1f64196589af081bc2f8e497c3 /tests/examplefiles/Get-CommandDefinitionHtml.ps1 | |
parent | f1c080e184dc1bbc36eaa7cd729ff3a499de568a (diff) | |
download | pygments-master.tar.gz |
Diffstat (limited to 'tests/examplefiles/Get-CommandDefinitionHtml.ps1')
-rw-r--r-- | tests/examplefiles/Get-CommandDefinitionHtml.ps1 | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/tests/examplefiles/Get-CommandDefinitionHtml.ps1 b/tests/examplefiles/Get-CommandDefinitionHtml.ps1 deleted file mode 100644 index b181955f..00000000 --- a/tests/examplefiles/Get-CommandDefinitionHtml.ps1 +++ /dev/null @@ -1,66 +0,0 @@ -
-function Get-CommandDefinitionHtml {
-
- # this tells powershell to allow advanced features,
- # like the [validatenotnullorempty()] attribute below.
- [CmdletBinding()]
- param(
- [ValidateNotNullOrEmpty()]
- [string]$name
- )
-
- $command = get-command $name
-
- # Look mom! I'm a cmdlet!
- $PSCmdlet.WriteVerbose("Dumping HTML for " + $command)
-
-@"
- <html>
- <head>
- <title>$($command.name)</title>
- </head>
- <body>
- <table border="1">
-$(
- $command.parametersets | % {
-@"
-
- <tr>
- <td>$($_.name)</td>
- <td>
- <table border="1">
- <tr>
- <th colspan="8">Parameters</th>
-
-$(
- $count = 0
- $_.parameters | % {
- if (0 -eq ($count % 8)) {
-@'
- </tr>
- <tr>
-'@
- }
-@"
- <td>$($_.name)</td>
-"@
- $count++
- }
-)
- </tr>
- </table>
- </td>
- </tr>
-"@
- }
-)
- </table>
- </body>
- </html>
-"@
-}
-
-Get-CommandDefinitionHtml get-item > out.html
-
-# show in browser
-invoke-item out.html
|