File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ function Invoke-Interpreter {
9
9
10
10
This command is not used directly, it is used by creating an alias to invoke-interpreter.
11
11
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.
13
13
#>
14
14
param ()
15
15
@@ -27,7 +27,7 @@ function Invoke-Interpreter {
27
27
$MyWords = @ ($myLine -split ' \s{1,}' )
28
28
29
29
# If the first word is a variable
30
- if ($MyWords [0 ] -match ' ^\$(?<v>\w+)' ) {
30
+ if ($MyWords [0 ] -match ' ^\$(?<v>\w+)' ) {
31
31
$firstWordVariableValue = $ExecutionContext.SessionState.PSVariable.Get ($matches.0 -replace ' ^\$' ).Value
32
32
# and it has a value
33
33
if ($firstWordVariableValue ) {
@@ -38,7 +38,7 @@ function Invoke-Interpreter {
38
38
# If the first word is not a variable,
39
39
elseif ($MyWords [0 ] -match ' ^(?<w>\w+)' ) {
40
40
# see if it's an alias
41
- $firstWordAlias = $ExecutionContext.SessionState.InvokeCommand.GetCommand ($mywords [0 ], ' Alias' )
41
+ $firstWordAlias = $ExecutionContext.SessionState.InvokeCommand.GetCommand ($mywords [0 ], ' Alias' )
42
42
if ($firstWordAlias.ReferencedCommand -ne $myInv.MyCommand.Name ) {
43
43
# and use the referenced command as the invocation name.
44
44
$invocationName = $firstWordAlias
You can’t perform that action at this time.
0 commit comments