Repository navigation
Import PowerShell changes - #442
Closed
Andy Jordan (andyleejordan) wants to merge 58 commits into
Closed
Andy Jordan (andyleejordan) wants to merge 58 commits into
Andy Jordan (andyleejordan) wants to merge 58 commits into
Conversation
Since the project is `Microsoft.PowerShell.PSReadLine`, the embedded resource name had to be fixed.
This compares the keys by a combination of their ConsoleKey and Modifiers fields. We cannot compare the KeyChar field as it is platform (and TTY configuration) dependent.
Use the file-system agnostic `System.IO.Path.DirectorySeparatorChar` for `GetReplacementTextForDirectory`, instead of hard-coded backslashes.
Needed System.Windows.Forms
Conflicts: src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs
Bug introduced in initial port of PSReadLine. `Path.Combine` sees the initial backslash as an absolute path, thus discarding `AppData`.
This resolves PowerShell#928. This is a breaking change in that you *must* be running a recent version of .NET CLI.
CHAR_INFO has 4 bits for ConsoleColor. On Linux, ConsoleColor is sometimes -1 (unknown), which is a 17th possible value for ConsoleColor, which can't be represented in CHAR_INFO. To fix this, I've introduced a bigger type that gets converted to CHAR_INFO when necessary.
This is instead of hard-coding a call to SetDefaultWindowsBindings().
This is enabled for PowerShell projects, but not PackageManagment, WSMan, Cim, or MMI.
Mostly low-hanging fruit and Linux additions/changes.
The ConsoleKey enum does not necessarily cover all possible chars. Moreover, the times we need to obtain this info, we already have it.
Given the use of key.KeyChar, the original implementation is now portable.
Due to virtual key codes on Windows, simple chords like Ctrl+] are not recognized as such. Instead, the ConsoleKey is Oem6, and the KeyChar is an control code.
* Adding debugType portable to project.json. * Move debugType. * Update project.json * Update project.json * Update project.json * Update project.json * Update project.json * Update project.json * Update project.json * Update project.json * Moving debugType into correct places. Removing from non-core builds. * Added missed files. * Fixing project.json debugType placement.
I replace all occurrences of http://go.microsoft.com with https://go.microsoft.com in text files.
* spelling: comments in src/Microsoft.Management.Infrastructure.CimCmdlets * spelling: comments in src/Microsoft.PackageManagement.ArchiverProviders * spelling: comments in src/Microsoft.PackageManagement.CoreProviders * spelling: comments in src/Microsoft.PackageManagement.MetaProvider.PowerShell * spelling: comments in src/Microsoft.PackageManagement.MsiProvider * spelling: comments in src/Microsoft.PackageManagement.MsuProvider * spelling: comments in src/Microsoft.PackageManagement.NuGetProvider * spelling: comments in src/Microsoft.PackageManagement.PackageSourceListProvider * spelling: comments in src/Microsoft.PackageManagement * spelling: comments in src/Microsoft.PowerShell.Activities * spelling: comments in src/Microsoft.PowerShell.Commands.Diagnostics * spelling: comments in src/Microsoft.PowerShell.Commands.Management * spelling: comments in src/Microsoft.PowerShell.Commands.Utility * spelling: comments in src/Microsoft.PowerShell.ConsoleHost * spelling: comments in src/Microsoft.PowerShell.Core.Activities * spelling: comments in src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext * spelling: comments in src/Microsoft.PowerShell.CoreCLR.Eventing * spelling: comments in src/Microsoft.PowerShell.Diagnostics.Activities * spelling: comments in src/Microsoft.PowerShell.GraphicalHost * spelling: comments in src/Microsoft.PowerShell.LocalAccounts * spelling: comments in src/Microsoft.PowerShell.Management.Activities * spelling: comments in src/Microsoft.PowerShell.PSReadLine * spelling: comments in src/Microsoft.PowerShell.PackageManagement * spelling: comments in src/Microsoft.PowerShell.ScheduledJob * spelling: comments in src/Microsoft.PowerShell.Security.Activities * spelling: comments in src/Microsoft.PowerShell.Security * spelling: comments in src/Microsoft.PowerShell.Utility.Activities * spelling: comments in src/Microsoft.PowerShell.Workflow.ServiceCore * spelling: comments in src/Microsoft.WSMan.Management.Activities * spelling: comments in src/Modules * spelling: comments in src/Schemas * spelling: comments in src/libpsl-native * spelling: comments in src/powershell-native * spelling: comments in build.psm1 * spelling: comments in src/System.Management.Automation/CoreCLR * spelling: comments in src/System.Management.Automation/DscSupport * spelling: comments in src/System.Management.Automation/cimSupport * spelling: comments in src/System.Management.Automation/commands * spelling: comments in src/System.Management.Automation/engine/Modules
…lvedCommandCouldSucceed
Before this commit there were three spellings, one of which was a typo, one was a variant spelling, and one was the dominant spelling. Microsoft generally uses Hangul for its enums: https://msdn.microsoft.com/en-us/library/cc250412.aspx And this is the dominant spelling in general and as used in web browsers.
* Fix for Linux remote debugging hang bug. * Removing dependency in PSReadLine on new engine helper API since it needs to be compatible with V3.
* Remove key signing (no key available) * Ignore project.lock.json * Add powershell-core MyGet feed * Depend on SMA NuGet package instead of project
Member
Author
|
What ended up happening with this? |
Contributor
|
I was sort of sitting on this until the story for creating 1 binary for Windows PowerShell and PowerShell core was worked out. But after that's worked out, there is more work - this PR disables clipboard support because .Net Core doesn't have the apis we use. |
Member
Author
|
Okay, cool. I was just going through my PR Dashboard and cleaning stuff up. I had PRs open from 2014... |
Contributor
|
I cherry-picked many of the changes and reworked a couple big changes around rendering and key bindings - see #561. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
I exported the changes made to PSReadLine in the PowerShell repo, and imported them here. I've added a commit so that it can be built outside of the PowerShell repo; however, I have not dealt with merge conflicts.
I would advise against attempting to rebase this, as it is too far diverged (I tried; it's not worth it). Merging master in would be the best choice; and the conflicts didn't look too bad (mostly around the addition of the TTY Console abstraction).
All changes were either made by Microsoft employees/contractors, or people who signed the PowerShell CLA.
Issue reference: PowerShell/PowerShell#996
To export and import changes, in the PowerShell repo I did:
git format-patch -o ~/patches --relative=src/Microsoft.PowerShell.PSReadLine 3603f2810.. src/Microsoft.PowerShell.PSReadLine(The last argument there may have been unnecessary.)
And to import into PSReadLine, I did:
This procedure can continue to be used to sync patches back and forth, as long as the common base is known (which I obtained by inspecting 3603f2810, the first commit in the PSReadLine subtree). I'm sure there are other ways to go about this, but
format-patchandamare the ones I am most familiar with.