Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upEnable Set-Location -LiteralPath to work with folders named "-" and "+" #8089
+113
−47
Conversation
SteveL-MSFT
assigned
iSazonov
Oct 20, 2018
SteveL-MSFT
requested review from
BrucePay and
anmenaga
Oct 20, 2018
SteveL-MSFT
requested review from
adityapatwardhan and
daxian-dbw
as
code owners
Oct 20, 2018
bergmeister
approved these changes
Oct 20, 2018
|
LGTM, thanks for quickly taking on this task. |
iSazonov
reviewed
Oct 20, 2018
iSazonov
and others
added some commits
Oct 21, 2018
iSazonov
reviewed
Oct 21, 2018
| Set-Location $TestDrive | ||
| $literalPath = Join-Path $TestDrive $path | ||
| New-Item -ItemType Directory -Path $literalPath | ||
| Set-Location -LiteralPath $path |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
SteveL-MSFT
Oct 22, 2018
Author
Member
Escaping happens outside of this PR and this will continue to work
iSazonov
approved these changes
Oct 21, 2018
anmenaga
approved these changes
Oct 23, 2018
|
It would be good to have a |
SteveL-MSFT
force-pushed the
SteveL-MSFT:set-location-literalpath
branch
to
39165c8
Oct 23, 2018
iSazonov
merged commit 9141b11
into
PowerShell:master
Oct 24, 2018
8 checks passed
CodeFactor
46 issues fixed. 3 issues found.
Details
PowerShell-CI-linux
#PR-8089-20181023.01 succeeded
Details
PowerShell-CI-macos
#PR-8089-20181023.01 succeeded
Details
PowerShell-CI-spelling
#PR-8089-20181023.01 succeeded
Details
PowerShell-CI-windows
#PR-8089-20181023.01 succeeded
Details
WIP
ready for review
Details
continuous-integration/appveyor/pr
AppVeyor build succeeded
Details
license/cla
All CLA requirements met.
Details
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
adityapatwardhan
pushed a commit
to adityapatwardhan/PowerShell
that referenced
this pull request
Apr 9, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
SteveL-MSFT commentedOct 20, 2018
•
edited
PR Summary
#7206 added the ability to use
cd -andcd +to navigate through location history. However, it prevented navigating to folders literally named "-" and "+". The internalsetlocation()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
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.[feature]if the change is significant or affects feature tests