Skip to content

Commit cfacffd

Browse files
StartAutomatingStartAutomating
authored andcommitted
Join-PipeScript: Overhauling (Fixes #231 Fixes #232 Fixes #233 Fixes #236)
1 parent de1f7a6 commit cfacffd

File tree

1 file changed

+52
-17
lines changed

1 file changed

+52
-17
lines changed

docs/Join-PipeScript.md

Lines changed: 52 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,8 @@ Get-Command Join-PipeScript | Join-PipeScript
2424

2525
#### EXAMPLE 2
2626
```PowerShell
27-
{
28-
param(
29-
[string]
30-
$x
31-
)
32-
},
33-
{
34-
param(
35-
[string]
36-
$y
37-
)
38-
} |
27+
{param([string]$x)},
28+
{param([string]$y)} |
3929
Join-PipeScript
4030
```
4131

@@ -52,6 +42,13 @@ $y
5242
} | Join-PipeScript
5343
```
5444

45+
#### EXAMPLE 4
46+
```PowerShell
47+
{
48+
param($x = 1)
49+
} | Join-PipeScript -ExcludeParameter x
50+
```
51+
5552
---
5653
### Parameters
5754
#### **ScriptBlock**
@@ -71,10 +68,10 @@ A ScriptBlock written in PowerShell or PipeScript.
7168

7269

7370
---
74-
#### **SkipBlockType**
71+
#### **ExcludeBlockType**
7572

76-
A list of block types to be skipped during a merge of script blocks.
77-
By default, no blocks will be skipped
73+
A list of block types to be excluded during a merge of script blocks.
74+
By default, no blocks will be excluded.
7875

7976

8077

@@ -83,6 +80,7 @@ Valid Values:
8380
* using
8481
* requires
8582
* help
83+
* header
8684
* param
8785
* dynamicParam
8886
* begin
@@ -102,7 +100,7 @@ Valid Values:
102100

103101

104102
---
105-
#### **BlockType**
103+
#### **IncludeBlockType**
106104

107105
A list of block types to include during a merge of script blocks.
108106

@@ -113,6 +111,7 @@ Valid Values:
113111
* using
114112
* requires
115113
* help
114+
* header
116115
* param
117116
* dynamicParam
118117
* begin
@@ -148,10 +147,46 @@ If set, will transpile the joined ScriptBlock.
148147
149148

150149

150+
---
151+
#### **IncludeParameter**
152+
153+
A list of parameters to include. Can contain wildcards.
154+
If -IncludeParameter is provided without -ExcludeParameter, all other parameters will be excluded.
155+
156+
157+
158+
> **Type**: ```[String[]]```
159+
160+
> **Required**: false
161+
162+
> **Position**: named
163+
164+
> **PipelineInput**:false
165+
166+
167+
168+
---
169+
#### **ExcludeParameter**
170+
171+
A list of parameters to exclude. Can contain wildcards.
172+
Excluded parameters with default values will declare the default value at the beginnning of the command.
173+
174+
175+
176+
> **Type**: ```[String[]]```
177+
178+
> **Required**: false
179+
180+
> **Position**: named
181+
182+
> **PipelineInput**:false
183+
184+
185+
151186
---
152187
### Syntax
153188
```PowerShell
154-
Join-PipeScript -ScriptBlock <ScriptBlock[]> [-SkipBlockType <String[]>] [-BlockType <String[]>] [-Transpile] [<CommonParameters>]
189+
Join-PipeScript -ScriptBlock <ScriptBlock[]> [-ExcludeBlockType <String[]>] [-IncludeBlockType <String[]>] [-Transpile] [-IncludeParameter <String[]>] [-ExcludeParameter <String[]>] [<CommonParameters>]
155190
```
156191
---
157192

0 commit comments

Comments
 (0)