Skip to content

Commit 1deca1b

Browse files
committed
Add TabExpansion2 example
1 parent 3ebe06b commit 1deca1b

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

terminology.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,33 @@ Example:
5656
Command names and parameters usually use PascalCase, but verify the correct casing by inspecting the
5757
command definitions.
5858

59-
Example:
59+
For example, the parameters of the `TabExpansion2` function don't use PascalCase:
6060

6161
```powershell
62-
TabExpansion2 -inputScript Foo
62+
TabExpansion2 -inputScript "TabExpansion2 -" | Select-Object -ExpandProperty CompletionMatches
63+
```
64+
65+
```Output
66+
CompletionText ListItemText ResultType ToolTip
67+
-------------- ------------ ---------- -------
68+
-inputScript inputScript ParameterName [string] inputScript
69+
-cursorColumn cursorColumn ParameterName [int] cursorColumn
70+
-ast ast ParameterName [Ast] ast
71+
-tokens tokens ParameterName [Token[]] tokens
72+
-positionOfCursor positionOfCursor ParameterName [IScriptPosition] positionOfCursor
73+
-options options ParameterName [hashtable] options
74+
-Verbose Verbose ParameterName [switch] Verbose
75+
-Debug Debug ParameterName [switch] Debug
76+
-ErrorAction ErrorAction ParameterName [ActionPreference] ErrorAction
77+
-WarningAction WarningAction ParameterName [ActionPreference] WarningAction
78+
-InformationAction InformationAction ParameterName [ActionPreference] InformationAction
79+
-ProgressAction ProgressAction ParameterName [ActionPreference] ProgressAction
80+
-ErrorVariable ErrorVariable ParameterName [string] ErrorVariable
81+
-WarningVariable WarningVariable ParameterName [string] WarningVariable
82+
-InformationVariable InformationVariable ParameterName [string] InformationVariable
83+
-OutVariable OutVariable ParameterName [string] OutVariable
84+
-OutBuffer OutBuffer ParameterName [int] OutBuffer
85+
-PipelineVariable PipelineVariable ParameterName [string] PipelineVariable
6386
```
6487

6588
### Specific examples
@@ -197,7 +220,7 @@ confusion. Use the following terminology instead:
197220

198221
### `$_` vs. `$PSItem`
199222

200-
`$_` and `$PSItem` are automatic varidables that refer to the current object in the pipeline.
223+
`$_` and `$PSItem` are automatic variables that refer to the current object in the pipeline.
201224
Technically, neither variable is an alias. Both variables contain the same value.
202225

203226
`$PSItem` was added to PowerShell later in an attempt to provide a clearer purpose to the name.

0 commit comments

Comments
 (0)