Tab completing paths containing variables or environment variables should not replace those variables
Votes from Connect: 19
Original Date Submitted: 7/16/2013 9:20:31 PM
Handle: Kirk Munro
Site Name: PowerShell
Feedback ID: 794116
Frequency: Always Happens
Regression: Yes, this happens in all previous versions
If you reference a variable or an environment variable in a path and press tab, tab completion expands (replaces) the variable/environment variable with the actual value of that variable. In a scripting environment, this is anti-best scripting practices. Instead it should allow for tab completion while leaving the variable as a variable. Here are a few examples:
Then press <TAB>. $PSHome is replaced with the actual $PSHome value. If you are writing a script that you want to be portable, suddenly you're dealing with an absolute, non-portable path that is machine specific that may cause the script to fail in other environments.
Here's a more plausible example, working with local app data.
Now your LOCALAPPDATA environment variable is expanded, which references your current user name and an absolute path that is again non-portable, environment specific, and even localized.
Please fix this so that tab completion works without expanding variables that are included in the path.
Product Studio item created by Connect Synchronizer due to creation of feedback ID 794116 (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=794116).
Tab completion should expand this to "$env:LOCALAPPDATA\Microsoft\Event Viewer"
Internal BugId: 4309