Commit Graph
100 Commits
Author SHA1 Message Date
Andrew Schwartzmeyer 811f052ae9 Improve error message of Start-NativeExecution 2016-05-18 14:53:21 -07:00
Andrew Schwartzmeyer 730c8f04fe Use -noprofile in build.sh 2016-05-18 14:25:17 -07:00
Andrew Schwartzmeyer fcf4b38370 Rename PowerShellGitHubDev.psm1 to build.psm1 2016-05-18 13:58:59 -07:00
Andrew Schwartzmeyer 60f6e05017 Add non-interactive console known issue 2016-05-18 10:50:00 -07:00
Andrew Schwartzmeyer e2f4b16c2f Add team coordination link to internal docs 2016-05-18 10:47:13 -07:00
Andrew Schwartzmeyer e140e215bb Add aliases known issue 2016-05-18 10:43:16 -07:00
Andrew Schwartzmeyer 1381140f6e Add sessions known issue 2016-05-18 10:36:52 -07:00
Andrew Schwartzmeyer f75b39e5cd PSRP known issues removed
Since it was decoupled from this repo.
2016-05-18 10:21:28 -07:00
Andrew Schwartzmeyer ac55b037ae Eventing known issue is fixed 2016-05-18 10:16:08 -07:00
Andrew Schwartzmeyer d1f6adb0a3 MMIN known issue is fixed 2016-05-18 10:14:17 -07:00
Andrew Schwartzmeyer 1aa6a4904b Update Linux installation documentation 2016-05-18 10:10:25 -07:00
Andrew Schwartzmeyer 7675de8d74 Link Pester readme to Pester Do and Don't 2016-05-18 10:08:05 -07:00
Andrew Schwartzmeyer 2d1b99d82e Fix docs/Testing capitalization 2016-05-18 10:04:47 -07:00
Andrew Schwartzmeyer 64efb9d799 Fix ReadLineWithTabCompletion port
Revert change made within the function since the function itself is
compiled out for the portable version of PowerShell.
2016-05-17 13:47:47 -07:00
Andrew Schwartzmeyer b67d765b3a Use WrapSize for WindowSize when unavailable 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 7afe9aa60f Say that the portable UI supports virtual terminal
Which is most likely true.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 772ecb8f8e Rename OPEN flag to PORTABLE
Makes more sense.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 7e65fa448e Mark as pending Travis CI OS X failing tests
These tests *do not* fail locally, nor on the Linux test runner. They do
not fail when accessing the OS X runner under debug mode. The *only*
cause is the lack of a TTY on the OS X runner, which is a Travis CI
regression. Moreover, the formatting tests do not fail when the TTY is
removed locally.

These absolutely should be fixed at some point, but it is not worth
spending any more time on it.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 44028f0da3 Fix formatting and output when stdout is redirected 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer fa86c89925 Enable pre and post write in WriteToConsole 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 800fa4ca18 Remove env key from OS X build
`Start-PSBootstrap` takes care of this.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer d1c2a2c896 Disable Set-PSDebug tests on AppVeyor
These pass locally, just not with AppVeyor's host.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 2712cead34 Use Pending for tests that shouldn't be Skipped 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer fe5328006d Fix Import-Alias tests 2016-05-17 13:28:44 -07:00
Andy Schwartzmeyer 2fdf48165a Clean up Set-PSDebug tests 2016-05-17 13:28:44 -07:00
Andy Schwartzmeyer 6cd7804fb0 Mark redirected input test as pending on Windows
While this passes on Linux, it does not pass on Windows, indicating a
platform-specific bug in .NET Core.
2016-05-17 13:28:44 -07:00
Andy Schwartzmeyer fbc794b933 Guard BufferSize for improper terminals 2016-05-17 13:28:44 -07:00
Andy Schwartzmeyer 86e8673826 Don't build more unused code
This code is all used for reading secure strings, which we don't yet
support.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 0dc549ecac Use -noninteractive on AppVeyor 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 6d7b6a10f6 Skip complex prompting tests
Not supported with non-PSReadLine Open PowerShell host.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer aa8dc7c901 Use -noprofile on AppVeyor 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer e387961c31 Add -noprofile to Start-PSPester 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 7f491beabb Fix AppVeyor to use Get-PSOutput
Instead of hard-coded paths.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer c3eaf9a77e Mark as pending tests not working with ConsoleHost 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer eee564e465 Delete deprecated CoreConsoleHost project 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 97ea9308fb Add readme to src/powershell 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 6d3c42a0b0 Migrate profile 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 1a61837c07 Migrate CoreConsoleHost/Modules
And update mapping.json
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 630eb69c7c Add managed entrance for powershell project
The powershell project's `Main` function initializes the custom
`AssemblyLoadContext` and then delegates to `UnmanagedPSEntry.Start`.
This lets us undo several changes to the `ConsoleHost` managed
entry (notably, the `Start` function signature does not have to change,
thus the `consoleFilePath` variable still exists).
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer a1a722c4a1 Add powershell project shim
The `src/powershell` project builds Core PowerShell as a .NET CLI app,
with a dependency on `Microsoft.PowerShell.ConsoleHost`, so that the
latter can remain a library.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 7f9052c1c6 Remove platform tests
This is pointless to test as the .NET Code better be correct, or we have
worse problems.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 7c80035d35 Skip xUnit tests not yet ported to OS X 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 0012fa90d6 Remove deprecated Listener tests 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 4234b3db73 Remove CoreConsoleHost from xUnit tests 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer fc9aa4cd88 Make ConsoleHost internals visible to powershell-tests 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 658f3e0d48 Update xUnit project to use ConsoleHost 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 5c0d17e3a2 Update ConsoleHost tests 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer dca17ac0f7 Migrate ConsoleHost tests 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer d8b2d1fb0e Fix command-line parser to support --parameters 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer c4bfc52c76 Migrate ConsoleHost .gitignore 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 849ea50ab7 Load PSReadLine by correct name
Linux is case-sensitive, so the modules are too.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 78dd93c1ac Build PSReadLine for ConsoleHost 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 2e71a090e7 Use ~/.powershell for ConsoleHost profile on Linux 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 8af7d5f344 Guard use of ConsoleControl in ConsoleHostRawUserInterface
This uses the RawUserInterface implementation from the original
CoreConsoleHost.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 02e9f100d2 Guard use of ConsoleControl in ConsoleHostUserInterface 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 702082f597 Guard use of ConsoleControl in ConsoleHost 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 3cd0d75278 Don't build ConsoleControl 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 602c7c39fc Don't build EngineInstaller 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 04f551fe91 Don't build MshHostMshSnapin 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 8021247b43 Guard AmsiUtils in SessionState Init 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 2f73af53df Remove native host dependency for ConsoleHost
When Open PowerShell is built (as .NET Core project), `OPEN` is defined.
The `Start` function normally used as the entry point from PowerShell's
custom native host is instead the real `Main` entry point of the
program, so it can be launched from the `dotnet` host.

Because Core PowerShell depends on the native host to setup the custom
assembly load context, we do it here in managed code immediately on
start-up.
2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 6f425d0ffd Make ConsoleHost deploy profiles and native libraries 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 2d2d58cb23 Make ConsoleHost/AssemblyInfo portable 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer ad9c4084d8 Make ConsoleHost emit powershell executable 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer 0c62b9a12d Always build ConsoleHost as top project 2016-05-17 13:28:44 -07:00
Andrew Schwartzmeyer cefa51b0d2 Pin cmdlet example packages to RC2
Otherwise builds fail because of RC3.
2016-05-17 12:34:50 -07:00
Andrew Schwartzmeyer 357f38f26d Comment out template guidelines
Thanks @vors! This makes the guidelines not show up in the rendered
issue/pull request, but keeps the text in the source.
2016-05-16 15:04:24 -07:00
Andrew Schwartzmeyer ae24cfe86c Pin AppVeyor to .NET CLI 1.0.0-rc2-002655
The preview channel's latest is no good.
2016-05-06 13:57:19 -07:00
Andrew Schwartzmeyer 63ab9fe681 Bump MMIN package to rc4
With the correct NETStandard.Library dependency.
2016-05-06 11:49:02 -07:00
Andrew Schwartzmeyer 1411ce2a46 Ignore the debug folder 2016-05-06 10:59:53 -07:00
Andrew Schwartzmeyer 339917a007 Add an FAQ about build failures 2016-05-06 10:59:15 -07:00
Andrew Schwartzmeyer 502cd381ea Note the pre-release VS Code requirements 2016-05-06 10:55:17 -07:00
Andrew Schwartzmeyer 77ffc715dc Make VS Code debug powershell with -NonInteractive 2016-05-06 10:48:01 -07:00
Andrew Schwartzmeyer 403ba4f735 Use -Output switch to fix VS Code debugging story 2016-05-06 10:30:48 -07:00
Andrew Schwartzmeyer eb92b28965 Add Start-PSBuild -Output switch
When specified, it will join the given path relative to the PowerShell
repository. This is useful to choose where the built artifacts will
end-up, which is necessary to fix VS Code tasks.
2016-05-06 10:28:45 -07:00
Andrew Schwartzmeyer ee146e0153 Bump src/windows-build submodule
With MMI package.
2016-05-05 13:49:39 -07:00
Andrew Schwartzmeyer da2d6bfc80 Add PSReadLine regression tests 2016-05-04 16:27:51 -07:00
Andrew Schwartzmeyer 2af90428ed Update dotnet-test-xunit package 2016-05-04 13:43:52 -07:00
Andrew Schwartzmeyer a7c1ba9079 Pin DotNet packages to eliminate NuGet warnings 2016-05-04 13:42:19 -07:00
Andrew Schwartzmeyer 9ec57aaf08 Add canonical CLI, NuGet, and xUnit feeds 2016-05-04 13:42:08 -07:00
Andrew Schwartzmeyer cf1455f1ba Update .NET Core from build 24022 to 24103 2016-05-04 13:16:40 -07:00
Andrew Schwartzmeyer 4619d0d7ba Add tests for cmdlet example 2016-05-04 12:13:00 -07:00
Andrew Schwartzmeyer b6145da14c Add AppVeyor sign-in instructions to FAQ 2016-05-04 10:41:49 -07:00
Andrew Schwartzmeyer 07a615e283 Add cmdlet example project with readme 2016-05-03 17:53:35 -07:00
Andrew Schwartzmeyer 9c5d076559 Fix directory completion for different file-systems
Use the file-system agnostic `System.IO.Path.DirectorySeparatorChar` for
`GetReplacementTextForDirectory`, instead of hard-coded backslashes.
2016-04-30 15:39:07 -07:00
Andrew Schwartzmeyer 573461e4c2 Fix comparison of keys in dispatch dictionary
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.
2016-04-29 10:11:34 -07:00
Andrew Schwartzmeyer 48d5ef755d Bump windows-build 2016-04-28 14:21:51 -07:00
Andrew Schwartzmeyer 689ca6a02f Remove CaptureScreen binding
Does not exist for Open PowerShell
2016-04-28 11:00:40 -07:00
Andrew Schwartzmeyer 0239674ff1 Add project.json to build test/PSReadLine 2016-04-28 10:54:51 -07:00
Andrew Schwartzmeyer 9c15c6ccd0 Import TestPSReadLine app
This app is used for basic PSReadLine functionality testing.

Squashed commit of the following:

commit 3c1ac0aa87df663d0cfb1346352fd240a6ad1fa4
Author: jason@truewheels.net <jason@truewheels.net>
Date:   Sun Dec 13 09:23:31 2015 -0800

    Use nuget packages for PowerShell SDK.

commit 0fe7731a68d62af9508200a067aa162cb5154f68
Author: jason@truewheels.net <jason@truewheels.net>
Date:   Sat Nov 14 20:11:50 2015 -0800

    Merge branch 'master' of https://github.com/srdubya/PSReadLine into vimode

commit aa6510e19887dd2cb1ed7fa06b172dc456b0cede
Author: Jason Shirk (POWERSHELL) <jasonsh@microsoft.com>
Date:   Thu Jun 18 18:24:23 2015 -0700

    Fix/suppress various FxCop errors

commit d59a997c3a2b4d18b91e0f937fc4ff76e58929f1
Author: Jason Shirk (POWERSHELL) <jasonsh@microsoft.com>
Date:   Thu Jun 18 15:32:20 2015 -0700

    Rename namespace PSConsoleUtilities to Microsoft.PowerShell

commit 258a8f28db90d98b8785487516544836ce42bb4e
Author: jason@truewheels.net <jason@truewheels.net>
Date:   Fri Sep 26 18:15:19 2014 -0700

    Fix exception after AcceptAndGetNext

    The "current" line cleared after accepting via AcceptAndGetNext
    and we would crash trying to recall this current line.

    I've changed how history search works after AcceptAndGetNext
    to work in a more natural way so that arrow keys can be used
    to recall commands near the accepted command instead of
    searching for other commands with the same prefix.

    Fixes #152.

commit e069ed088a9ea970d8b0e9cdb990da5ad4d20f01
Author: jason@truewheels.net <jason@truewheels.net>
Date:   Tue Sep 9 17:36:59 2014 -0700

    Add ValidateAndAcceptLine function

    To avoid cluttering the screen and history with command lines
    that don't work because of stupid errors like "command not found",
    you can bind enter to ValidateAndAcceptLine.

commit cb81fa2cc4708ee54214320dc6ce8564e38a1642
Author: jason@truewheels.net <jason@truewheels.net>
Date:   Fri Jun 27 20:58:57 2014 -0700

    Fix prompt error highlight characters

    When deciding what character to color red for errors, we were
    using IsSymbol - that was a bit too restrictive so it was changed
    to be any non-whitespace and non-alphanumeric characters.

    Fixes #127

commit 0ecd15d909ea31ccd9390c15d295af2f750d0d68
Author: Jason Shirk <jason@truewheels.net>
Date:   Thu Jun 12 14:09:17 2014 -0700

    Attempt better recovery from an exception

    If an exception occurs when editing the command line, display some
    diagnostic information so that I might get a bug report.  Also
    attempt to restore the command line so they can continue editing.

commit 079d18223c7e49638c96f4533d27198b47a5d2bb
Author: jason@truewheels.net <jason@truewheels.net>
Date:   Thu Apr 17 09:28:04 2014 -0700

    Tweak for easier testing

commit d79bf5056bdef0a165ee453c5f7b45e528cc0681
Author: jason@truewheels.net <jason@truewheels.net>
Date:   Sun Apr 13 11:21:30 2014 -0700

    Cleanup some Resharper issues

commit 1258dd12cab81d07aa52d388468ee9ef99063664
Author: jason@truewheels.net <jason@truewheels.net>
Date:   Sun Jan 26 20:21:22 2014 -0800

    InvokePrompt tests

    Removed Console.WriteLine replacement as it didn't work for InvokePrompt.
    Changed test harness to override VS and actually write stdout to the screen.

commit 526b0b5123c88cd8f47a166f376f34356976edb5
Author: jason@truewheels.net <jason@truewheels.net>
Date:   Fri Jan 24 23:00:48 2014 -0800

    Remove custom bindings

commit fd0679c0da99da5ae4e1d5a59842b1fb0a9af6c2
Author: jason@truewheels.net <jason@truewheels.net>
Date:   Fri Jan 3 00:09:49 2014 -0800

    Add CaptureScreen function

    CaputureScreen is used to copy lines from the screen to the clipboard.
    Text is copied in plain text as well as rtf with colors.
    Rtf looks best in Outlook - which is my primary reason for adding the feature.

commit e2a0b53f72a0e6a39a9736a3c1a3d2a6b1b81184
Author: Jason Shirk <jason@truewheels.net>
Date:   Fri Nov 15 07:29:12 2013 -0800

    Fix Undo after Paste

commit 8453eca0dd9ffe0cb160fefb12d0be935e64ec85
Author: Jason Shirk <jason@truewheels.net>
Date:   Fri Nov 15 00:30:50 2013 -0800

    Ctrl-R support

commit 0b058c2aaee18b33d97dd8d375fac7bbf4d07ce9
Author: Jason Shirk <jason@truewheels.net>
Date:   Sat Nov 2 08:49:48 2013 -0700

    Really exit from test program when typing exit

    Exit wasn't exiting anymore because the thread that reads keys was blocked.

commit e9d5203346f62dacc6315c8e8cb4dc227a6477df
Author: Jason Shirk <jason@truewheels.net>
Date:   Mon Sep 23 09:03:59 2013 -0700

    Comment out history search in test program

commit 674f90a64c5c627d50f6b018511eb9585640d65a
Author: Jason Shirk <jason@truewheels.net>
Date:   Thu Sep 19 09:18:19 2013 -0700

    Add demo mode and ETW trace

    Added ETW tracing for key presses (a key logger!) so it can be used
    in a variety of ways, e.g. when doing performance profiling, you can
    add a message of sorts via key presses if you turn on the provider.

    The ETW tracing code depends on CLR 4.5, this might force some folks
    to upgrade.

    Added PSReadline.EnableDemoMode which uses the ETW trace to display
    key presses while you type.  This is useful for talks and producing
    screen captures to show the editing experience.

commit 222a5efea732d6c34e5263b638d5d3fc04407355
Author: Jason Shirk <jason@truewheels.net>
Date:   Wed Sep 11 17:55:30 2013 -0700

    Support 2 key chords

    Support for 2 key chords has been added.

    There is a small breaking change in Set-PSReadlineKeyHandler
    because the -CtrlX switch is no longer needed.  It could have
    been left in, but it's better to just remove it - not very
    many people use this module yet.

    The signature of key handlers was also changed to better support
    features that have not yet been implemented.  The signature change
    shouldn't affect any existing key handlers because default arguments
    should cover those cases.

commit 3121bcbf6c57b98ead2cc525f8d3d40cbc54c49e
Author: Jason Shirk <jason@truewheels.net>
Date:   Fri May 24 19:56:34 2013 -0700

    Add Get-PSReadlineKeyHandler

    To make it easier to see what keys are bound, you can use the command Get-PSReadlineKeyHandler.

    The command Set-PSReadlineKeyHandler also adds support for binding Ctrl-X prefixed commands in Emacs mode.

commit ed78159f1a27f7a78a26fbad555203dcee94a05c
Author: Jason Shirk <jason@truewheels.net>
Date:   Sun May 12 23:52:15 2013 -0700

    Initial checkin.
2016-04-28 10:49:41 -07:00
Andrew Schwartzmeyer 04c49c376b Fix resource manager
Since the project is `Microsoft.PowerShell.PSReadLine`, the embedded
resource name had to be fixed.
2016-04-27 13:40:29 -07:00
Andrew Schwartzmeyer a4ef2b7e8b Add PSReadLine as base module
Note that, because Linux file systems are case-sensitive, we have to
use the correct capitalization that matches the actual module files.
2016-04-27 13:40:27 -07:00
Andrew Schwartzmeyer ef2092774c Add PSReadLine module files
These are copied from `src/Microsoft.PowerShell.PSReadLine`, which is
necessary until .NET CLI has better support for specifying
source/destination content information (which is coming soon).
2016-04-27 12:04:43 -07:00
Andrew Schwartzmeyer 1f56fd6692 Make CoreConsoleHost depend on PSReadLine 2016-04-27 11:01:55 -07:00
Andrew Schwartzmeyer d209febcae Add PSReadLine project.json 2016-04-27 11:00:45 -07:00
Andrew Schwartzmeyer 98303ea6e7 Avoid trying to load DLLs as Snap-Ins with Import-Module
Thanks @lzybkr.
2016-04-27 10:38:16 -07:00
Andrew Schwartzmeyer 53bfc80b56 Fix Pester tests
The `Get-Process` cmdlet cannot be used for these types of tests due to
security constraints on OS X.

These tests are about to be re-written soon anyway, so the simple fix
was to use another cmdlet.
2016-04-25 15:27:24 -07:00
Andrew Schwartzmeyer 86d7d749bb Update type catalog 2016-04-25 14:21:39 -07:00
Andrew Schwartzmeyer a48abd0b6c Fix xUnit tests for new framework
This also enables us to run them on OS X (though they will fail).
2016-04-25 14:11:13 -07:00
Andrew Schwartzmeyer ea5d5c3d05 Switch to netcoreapp1.0
Instead of using `dotnet publish`, we can use `dotnet build` and the new
`netcoreapp1.0` framework with a new dependency on
`Microsoft.NETCore.App` to generate output that does not include the
runtime, but can be run anywhere (given the installation of the
runtime).

While we cannot yet adopt a dependency on the shared host until .NET
Core RTM, we are forced to switch to this system anyway because the
latest RC3 packages and CLI do not support `netstandardapp1.5`. See
dotnet/cli#2482.

Thus we're in an in-between state where we have to use `netcoreapp1.0`,
but cannot use `"Microsoft.NETCore.App": { "type": "platform" }` to
utilize the shared host, as we need to continue to ship our host.
Without specifying "platform", we retain the status quo with respect to
build steps and outputs.

Additionally, there is no longer a good reason to use the RC3 packages,
and it has been advised we switch to RC2 since the
`Microsoft.NETCore.App` is only available for RC2. We must update
packages because our current version can no longer be debugged.
2016-04-25 14:01:44 -07:00