Skip to content

Commit 59f5a4f

Browse files
author
James Brundage
committed
feat: Invoke-Interpreter Call Operator Support ( Fixes #920 )
Whitespace edits.
1 parent 9da95c8 commit 59f5a4f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Commands/Interpreters/Invoke-Interpreter.ps.ps1

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

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

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

0 commit comments

Comments
 (0)