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
Set-Location -LiteralPath does not treat "-" and "+" as literals. #8086
You have a similar issue with a dir named [foo]. You can cd to it with cd -lp [foo] but the same doesn't work with cd -lp -. I think perhaps that should work in addition to cd .\-.
Reacted by Rain Sallow (/u/ta11ow) and Michael Klement
changed the title [-]Navigation impossible to folder named `-` and `+`[/-][+]Set-Location -LiteralPath does not treat "-" and "+" as literals.[/+]on Oct 21, 2018
Activity
vexx32 commentedon Oct 19, 2018
Surely this is accessible with
cd .\-andcd .\+?kvprasoon commentedon Oct 19, 2018
Rain Sallow (/u/ta11ow) (@vexx32) But that's not how directory navigation should be.
vexx32 commentedon Oct 19, 2018
That's an opinion, not a fact. And I'm sure folks accustomed to using
cd -andcd +on Linux would disagree there. 😄kvprasoon commentedon Oct 19, 2018
Cc Steve Lee (@SteveL-MSFT) , I thought of asking this at your session yesterday @PSConfAsia, but my lappie was not with me...
rkeithhill commentedon Oct 19, 2018
You have a similar issue with a dir named
[foo]. You can cd to it withcd -lp [foo]but the same doesn't work withcd -lp -. I think perhaps that should work in addition tocd .\-.vexx32 commentedon Oct 19, 2018
Yeah, I'd agree that
-LiteralPathshould not exhibit the history-navigation behaviour for obvious reasons!SteveL-MSFT commentedon Oct 20, 2018
Set-Location -LiteralPath -should treat it as a literal path and notPop-Locationso that is a bug. We can use this issue to track that.[-]Navigation impossible to folder named `-` and `+`[/-][+]Set-Location -LiteralPath does not treat "-" and "+" as literals.[/+]