Skip to content

Conversation

@SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented Oct 20, 2018

PR Summary

#7206 added the ability to use cd - and cd + to navigate through location history. However, it prevented navigating to folders literally named "-" and "+". The internal setlocation() api doesn't differentiate literal and non-literal paths so fix is to overload it with a flag to indicate path is literal so it doesn't process "-" and "+" as shortcuts.

Fix #8086

PR Checklist

Copy link
Contributor

@bergmeister bergmeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for quickly taking on this task.

iSazonov and others added 2 commits October 22, 2018 00:58
…Is.cs

Co-Authored-By: SteveL-MSFT <slee@microsoft.com>
…Is.cs

Co-Authored-By: SteveL-MSFT <slee@microsoft.com>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for the PR. Should this work too?

Set-Location -Path `+

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Escaping happens outside of this PR and this will continue to work

Copy link

@anmenaga anmenaga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to have a [feature] test pass for this.

address codefactor issues
@SteveL-MSFT SteveL-MSFT force-pushed the set-location-literalpath branch from d62c671 to 39165c8 Compare October 23, 2018 22:07
@iSazonov iSazonov merged commit 9141b11 into PowerShell:master Oct 24, 2018
@iSazonov iSazonov changed the title enable set-location -literalpath to work with folders named "-" and "+" Enable Set-Location -LiteralPath to work with folders named "-" and "+" Oct 24, 2018
@SteveL-MSFT SteveL-MSFT deleted the set-location-literalpath branch March 10, 2020 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set-Location -LiteralPath does not treat "-" and "+" as literals.

4 participants