Skip to content

Commit 6054bea

Browse files
committed
Add note about Get/Set variable limitation
1 parent cd9e205 commit 6054bea

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ The focus of the rename support is on quick updates to variables or functions wi
155155
❌ Scriptblocks that are part of a parameter are assumed to not be executing in a different runspace. For example, the renaming behavior will treat `ForEach-Object -Parallel {$x}` the same as `Foreach-Object {$x}` for purposes of finding scope definitions. To avoid unexpected renaming, define/redefine all your variables in the scriptblock using a param block.
156156
❌ A lot of the logic relies on the position of items, so for example, defining a variable in a `begin` block and placing it after a `process` block, while technically correct in PowerShell, will not rename as expected.
157157
❌ Similarly, defining a function, and having the function rely on a variable that is assigned outside the function and after the function definition, will not find the outer variable reference.
158+
`Get-Variable` and `Set-Variable` are not considered and not currently searched for renames
158159

159160
📄📄 Filing a Rename Issue
160161

0 commit comments

Comments
 (0)