Skip to content

Commit 5c81142

Browse files
StartAutomatingStartAutomating
authored andcommitted
feat: Invoke-Interpreter Call Operator Support ( Fixes #920 )
Whitespace edits.
1 parent e5f3f76 commit 5c81142

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Commands/Interpreters/Invoke-Interpreter.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function Invoke-Interpreter {
99
1010
This command is not used directly, it is used by creating an alias to invoke-interpreter.
1111
12-
This will happen automatically as you attempt to use commands that have an associated interpreter
12+
This will happen automatically as you attempt to use commands that have an associated interpreter.
1313
#>
1414
param()
1515

@@ -27,7 +27,7 @@ function Invoke-Interpreter {
2727
$MyWords = @($myLine -split '\s{1,}')
2828

2929
# If the first word is a variable
30-
if ($MyWords[0] -match '^\$(?<v>\w+)') {
30+
if ($MyWords[0] -match '^\$(?<v>\w+)') {
3131
$firstWordVariableValue = $ExecutionContext.SessionState.PSVariable.Get($matches.0 -replace '^\$').Value
3232
# and it has a value
3333
if ($firstWordVariableValue) {
@@ -38,7 +38,7 @@ function Invoke-Interpreter {
3838
# If the first word is not a variable,
3939
elseif ($MyWords[0] -match '^(?<w>\w+)') {
4040
# see if it's an alias
41-
$firstWordAlias = $ExecutionContext.SessionState.InvokeCommand.GetCommand($mywords[0], 'Alias')
41+
$firstWordAlias = $ExecutionContext.SessionState.InvokeCommand.GetCommand($mywords[0], 'Alias')
4242
if ($firstWordAlias.ReferencedCommand -ne $myInv.MyCommand.Name) {
4343
# and use the referenced command as the invocation name.
4444
$invocationName = $firstWordAlias

0 commit comments

Comments
 (0)