Commit Graph
109 Commits
Author SHA1 Message Date
Andy Jordan 06e3b4bcb6 Add fixture to enable existing tests for screen reader mode
Tests that depend on supported features such as menu completions, list
view, inline predictions, continuation prompt, and colors are skipped.

The "helper" module for running tests from the command-line and in
AppVeyor is minimally updated to not skip the new fixture.

A `BlankRestOfBuffer()` function implements the semantics of the `0J`
control sequence in the mock console.
2025-08-27 17:46:47 -07:00
Andy Jordan 7a5826bac3 Fix hard-coded continuation prompt in tests
These tests were using a hard-coded continuation prompt (and its length)
which blocks tests for the upcoming screen reader mode.

This is also simply a reasonable refactor, thanks Claude (for trying).
2025-08-27 16:52:03 -07:00
Andy Jordan 49071163a1 Fix ellipsis / continuation character encoding issue in tests
This character was always meant to be an ellipsis. I'm unsure exactly
why Visual Studio interprets it so, but VS Code and GitHub do not. This
commit replaces it with the actual Unicode character which ensures the
tests continue to pass when these files are edited and saved in VS Code.
2025-08-27 16:46:15 -07:00
Dongbo Wang 7b840fdef0 Fix line ending and cache some reflection operations (#4709) 2025-04-17 12:06:56 -07:00
Maxime Labelle b1f8c8979f Improve test reliability by making sure the PSReadLine one-time initialization is done (#4686) 2025-04-17 11:08:30 -07:00
Dongbo Wang 49604e89ec Update PSReadLine build to target netstandard2.0 (#4584)
By retargeting PSReadLine to `netstandard2.0`, we can simplify the build a lot and produce the same assembly no matter building on Windows or non-Windows.

- Update PSReadLine build to target `netstandard2.0`, including the CI and release pipeline YAML files.
- Update the test to target `net472` and `net6.0`, so that we can run tests with both .NET Framework and .NET
- Rename `Microsoft.PowerShell.PSReadLine2.dll` to `Microsoft.PowerShell.PSReadLine.dll`
- Update and clean up the `README.md` with the up-to-date information
2025-02-28 11:09:08 -08:00
Dongbo Wang a1130b5190 Release SBOM (#4201) 2024-10-02 16:08:06 -07:00
Dongbo Wang 61f598d8a7 Update SelectCommandArgument to properly handle POSIX style options for CLI commands (#4016) 2024-05-14 13:34:37 -07:00
Dongbo Wang 5efe2ef55f Prepare for the v2.4.0-beta0 release of PSReadLine (#3962) 2024-03-01 16:24:34 -08:00
Dongbo Wang fbdf7faf0b Fix a few VI key handlers to close edit group properly (#3845) 2023-10-24 09:46:18 -07:00
Dongbo Wang 423cb47324 Prepare for the v2.3.2-beta2 release of PSReadLine (#3783) 2023-08-17 14:10:13 -07:00
Maxime Labelle d7b9f82ba0 [vi-mode] Supports the text-object command diw (#2059) 2023-08-14 15:56:46 -07:00
Dongbo Wang ae08ca6caf Support tooltip rendering in the prediction list view (#3667) 2023-05-02 16:52:19 -07:00
Dongbo Wang 2fb3c330b8 Force refreshing suggestion in the inline view when plugin is in use (#3644) 2023-04-06 22:07:16 -07:00
Dongbo Wang 3d20df7831 Improve the sensitive history scrubbing to allow retrieving token from az, gcloud, and kubectl (#3641) 2023-04-04 11:02:46 -07:00
Dongbo Wang 1e84d68248 Improve the default sensitive history scrubbing to allow safe property access (#3630) 2023-03-22 15:47:14 -07:00
Dongbo Wang f1b2043481 Fix the menu completion to better handle the backspace key (#3574) 2023-02-27 11:01:48 -08:00
Dongbo Wang 372212e5ca Improve the list view to be scrollable and auto-adjust the list view height (#3583) 2023-02-27 10:48:00 -08:00
spaette 486388c59f Fix some typos in this repository (#3547) 2023-01-23 14:22:59 -08:00
Dongbo Wang 659c8282cd De-duplicate prediction results with the history results (#3543) 2023-01-23 11:04:40 -08:00
Enan Ajmain 6808c18762 Add support for upcasing, downcasing, and capitalizing word (#3365) 2022-07-18 10:26:40 -07:00
dependabot[bot] d82abc8892 Bump Newtonsoft.Json from 12.0.3 to 13.0.1 in test (#3353) 2022-06-22 13:34:14 -07:00
Dongbo Wang 77e256abcb Update build to use net462 (#3285)
net461 is reaching end of support on 4/26/2022.
2022-04-20 16:01:19 -07:00
Dongbo Wang f637a06ddb Update the version of PowerShell nuget packages to 7.2.0 (#3170) 2022-01-18 13:58:32 -08:00
Dongbo Wang acb8ccbb17 Make Ctrl+r in Vi edit mode same as Emacs edit mode (#3148) 2022-01-11 17:13:49 -08:00
Dongbo Wang 0824ad134f Make HistorySearchBackward and HistorySearchForward able to navigate the list view (#3144) 2022-01-11 15:38:49 -08:00
Dongbo Wang f46f15d2d6 Improve RecomputeInitialCoords to be more robust and handle a couple special cases (#3074) 2022-01-03 16:40:25 -08:00
Dongbo Wang b76883665b Add BasicScrollingConsole to support test cases for scrolling up scenarios (#3081) 2021-12-14 15:14:03 -08:00
Dongbo Wang 835bfd2bf8 Skip the AST analysis when command-line input has any parsing errors (#3075) 2021-12-02 16:24:09 -08:00
Dongbo Wang 1280763116 Make the default sensitive history scrubbing function a little smarter (#2921) 2021-10-13 17:43:02 -07:00
Dongbo Wang 0ae04cdc2a Update the inline suggestion rendering to not exceed the max window buffer (#2892) 2021-09-23 14:17:17 -07:00
Maxime Labelle 1966609701 [vi-mode] Undo now leaves the cursor under the position at the start of the deletion (#2045) 2021-09-21 23:04:43 -07:00
Dongbo Wang 355bd0894a Update 'CreateCharInfoBuffer' to support continuous 'NextLineToken' (#2880) 2021-09-20 17:14:45 -07:00
Dongbo Wang d37599781f Fix GotoBrace to handle the case when the text buffer is empty (#2879) 2021-09-20 13:49:25 -07:00
Dongbo Wang 078a2b3cc4 Fix rendering when continuation prompt is an empty string (#2875) 2021-09-20 09:26:12 -07:00
Dongbo Wang 82e35b857c Migrate the release build to use the 1ES agent pool and also fix the API scan (#2859) 2021-09-15 16:08:17 -07:00
Dongbo Wang f5a7ebda97 Update the use of the prediction interface to adapt to the breaking changes introduced in PowerShell 7.2.0-preview.6 (#2524) 2021-06-01 10:32:44 -07:00
Dongbo Wang dc38b451be Fix a null-ref exception in DynamicHelpImpl (#2292) 2021-03-11 09:14:44 -08:00
Dongbo Wang f8fb650774 Prepare for the 2.2.0-beta2 release (#2241) 2021-02-23 12:18:22 -08:00
Dongbo Wang 8df5b6ba08 Update PSReadLine corresponding to the prediction interface update (#2225) 2021-02-22 18:17:26 -08:00
Dongbo Wang 6ed95a23d5 Add the SelectCommandArgument bind-able function (#2222) 2021-02-17 15:25:27 -08:00
Aditya Patwardhan 6cf129ee35 Add the "Dynamic Help" feature to PSReadLine (#1777)
- Adds a way to view help on alternate screen buffer for full help and uses a Pager from `Microsoft.PowerShell.Pager`.
- Implements dynamic help for parameters by showing it below the current command line like `MenuComplete`.
2021-02-10 17:04:50 -08:00
Maxime Labelle 9e09968960 Prevent crash in GotoFirstNonBlankOfLine (#2050) (#2051) 2021-02-09 22:21:14 -08:00
Maxime Labelle 47fb95728c Make d0 to delete to the start of the current logical line in a multiline buffer in VI mode (#2002) 2021-02-09 21:45:37 -08:00
Maxime Labelle 1f6c5c0bc0 Deleting backward to or until a character should preserve the character under the cursor (#2007) 2020-12-07 11:43:30 -08:00
Maxime Labelle 352edb9c62 Use 'd^' to delete from the first non-blank character of a logical line (#2001) 2020-12-07 11:37:10 -08:00
Dongbo Wang 7fb13ea5c8 Add readonly modifier to some private fields (#1984) 2020-11-24 13:40:30 -08:00
Dongbo Wang 9f786b3397 Fix three issues with the menu completion (#1946)
1. Fix menu completion to work with the predictive list view (fix #1935 -- regression introduced in 2.2.0-beta1)
2. Fix menu completion to clear lines properly when the menu top changes on re-drawing (regression introduced in 2.2.0-beta1)
3. Fix how `RightArrow`, `LeftArrow`, `UpArrow`, and `DownArrow` navigate in the menu view (enhancement)
2020-11-13 11:20:51 -08:00
Dongbo Wang fd1265e385 Add the prediction ListView and also hook up with the CommandPrediction APIs introduced in PS 7.1 (#1909) 2020-11-03 14:17:37 -08:00
Dongbo Wang b33e222642 Rename 'PredictionColor' to 'InlinePredictionColor' (#1860) 2020-10-08 10:16:28 -07:00