You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tab completion should not replace ~ or variables #5350
cd ~\<TAB>
vim $env:APPDATA\<TAB>&$env:SystemRoot\<TAB>
When editing a script, the replacement might actually make the script less portable, e.g. $env:SystemRoot isn't always on the c: drive.
On the command line, you normally end up with a longer command line, and possibly less meaningful. It can also be less useful when searching your history.
We could have an option that control this behavior, but I suspect it should be the default.
Reacted by Keith Hill, Steve Lee, Joon Ro, Sebastian N., Tor Magnus Rakvåg, Troy Campbell, Staffan Gustafsson, Michael Klement, Brian G. Shacklett, Felix Becker and 12 more
A key binding depends on the host - e.g. PSReadLine or PS Editor Services - not something the core engine needs to provide, except perhaps an api to do the replacement.
A new api probably isn't worth it, various editors also want to support older versions of PowerShell and this replacement isn't that hard to implement with existing apis.
Activity
iSazonov commentedon Nov 7, 2017
Can we have a way (Alt-Shift) to replace ~ or variables still?
lzybkr commentedon Nov 7, 2017
A key binding depends on the host - e.g. PSReadLine or PS Editor Services - not something the core engine needs to provide, except perhaps an api to do the replacement.
A new api probably isn't worth it, various editors also want to support older versions of PowerShell and this replacement isn't that hard to implement with existing apis.
danbradham commentedon Sep 13, 2022
This issue seems to have gone stale, thought I'd give it a bump.
I run into this on a daily basis and I sort of just live with it even though it irritates me and leads to extraneous key presses!
masterflitzer commentedon Feb 28, 2023
yes this is so annoying, especially when working with both bash and pwsh on a regular basis (i notice it every single day)