Commit Graph
2442 Commits
Author SHA1 Message Date
Dongbo Wang 716754d220 Remove ThreadJob module and update PSReadLine to 2.4.4-beta4 (#26120) 2025-09-30 12:32:43 -07:00
Andy Jordan 3aa49cca9b Remove IsScreenReaderActive() check from ConsoleHost (#26118) 2025-09-30 12:18:52 -07:00
Dongbo Wang 3cfa4b2469 Mark the 3 consistently failing tests as pending to unblock PRs (#26091) 2025-09-30 11:44:27 -07:00
Matěj KafkaandDongbo Wang 551a0fe642 Fix ConvertFrom-Json to ignore comments inside array literals (#14553) (#26050)
Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
2025-09-23 10:29:11 -07:00
Dongbo Wang 506869c157 Fix -Debug to not trigger the ShouldProcess prompt (#26081) 2025-09-23 09:19:39 +05:00
xtqqczze d418ffe84c Make some tests less noisy on failure (#26035) 2025-09-11 13:55:36 -07:00
Dongbo Wang 53805fb426 Add the parameter Register-ArgumentCompleter -NativeFallback to support registering a cover-all completer for native commands (#25230) 2025-08-29 15:50:02 -07:00
Steve LeeandPatrick Meinecke 16aeaba68f Fix stderr output of console host to respect NO_COLOR (#24391)
Co-authored-by: Patrick Meinecke <SeeminglyScience@users.noreply.github.com>
2025-08-26 16:37:40 -04:00
Dongbo Wang d68c15e743 Update PATH environment variable for package manager executable on Windows (#25847)
Implementation for PowerShell/PowerShell-RFC#391. A few implementation decisions:

1. Check the package manager list only once per process (**same as CMD**). So, changing the package manager list in registry doesn't affect a PowerShell session that is already running.

2. When detecting user/system PATH value changes, only check new items PREPENDED or APPENDED to the original string (**same as CMD**). The detection is made simple, which is not intended to detect complex changes to the user/system PATH.

3. The PATH update feature is disabled when the `Environment` provider is not available, or when the current session is restricted.
    - Both `Environment` provider and `IsSessionRestricted` are checked only once per PowerShell session.
    - Use `ConditionalWeakTable` to cache whether the feature is enabled or not for a given session.
    - We cannot use `thread-static` variable for the caching because it's possible for Runspace to reuse threads.
2025-08-20 12:53:59 -07:00
Patrick Meinecke c5f2446e69 Suppress false positive PSScriptAnalyzer warnings in tests and build scripts (#25864) 2025-08-19 11:51:38 +05:00
Jordan Borean 4415386172 Improve the $using expression support in Invoke-Command (#24025)
Always use the v5.1 `$using:` logic when dealing with any connection type that is not based on the `WSManConnectionInfo`. This allows the caller to use the more advanced `$using` features like variables with special names, having `$using` vars inside sub scopes, and more. `WSMan` based connections might still communicate with older versions but as the oldest supported version is v3 on Server 2012. We don't need to keep the default as v2 (which has been deprecated) to support some of the newer features.
2025-08-04 16:31:30 -07:00
Aditya Patwardhan 07dfab2277 Fix updatable help test for new content (#25819) 2025-08-04 14:04:56 -07:00
Stéphane BARIZIEN a993992298 Adding hex format for native command exit codes (#21067) 2025-07-31 08:23:20 +05:00
Jordan Borean 11eeae97f0 Use parameter HelpMessage for tool tip in parameter completion (#25108)
Use the help message on the parameter in the completion tool tip to provide better completion help. This can be utilized by other tools to provide more context for a parameter outside of the current type and parameter name which is quite minimal.
2025-07-30 12:05:13 -07:00
Jordan BoreanandPatrick Meinecke ce76ae1def Fix debug tracing error with magic extents (#25726)
Co-authored-by: Patrick Meinecke <SeeminglyScience@users.noreply.github.com>
2025-07-15 13:42:09 -04:00
Jordan Borean c6329ddd54 Add MethodInvocation trace for overload tracing (#21320) 2025-07-14 15:42:14 -07:00
Justin Grote 8185a7f23e Improve verbose and debug logging level messaging in web cmdlets (#25510) 2025-06-11 09:50:26 +05:00
MartinGC94 038003408e Quote bare quote file paths if the path includes a double quote character (#25631) 2025-06-09 10:23:17 +05:00
CMandDongbo Wang b502098e3a Fix the common parameter -ProgressAction for advanced functions (#24591)
Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
2025-06-03 09:43:38 -07:00
Tadas Medišauskas b3bc4ff4e0 Use absolute path in FileSystemProvider.CreateDirectory (#24615) 2025-05-13 11:29:48 +05:00
Matthias Wolf eb1cc6ddcd Make inherited protected internal instance members accessible in PowerShell class scope (#25245) 2025-05-12 14:30:12 -07:00
GameMicrowave fcc1833963 Treat -Target as literal in New-Item (#25186) 2025-05-12 16:22:29 +05:00
MartinGC94 e7ee9da1ea Remove duplicate modules from completion results (#25538) 2025-05-12 08:18:11 +05:00
Dongbo Wang 52150fd8a7 Add more tests for PSForEach and PSWhere methods (#25519) 2025-05-09 11:15:03 -07:00
MartinGC94 957eb1b279 Add completion for variables assigned in ArrayLiterals and ParenExpressions (#25303) 2025-05-08 18:17:40 +05:00
(Havox) 1b786d2d89 Add support for thousands separators in [bigint] casting (#25396) 2025-05-08 17:10:33 +05:00
Staffan Gustafsson 9cbbb8ff32 Add PSForEach and PSWhere as aliases for the PowerShell intrinsic methods Where and Foreach (#25511) 2025-05-05 17:13:02 -07:00
Dongbo Wang f53865d1a4 Fix the isolated module test that was disabled previously (#25420) 2025-05-03 16:51:51 -07:00
MartinGC94 2fc4821e53 Revert "Allow empty prefix string in 'Import-Module -Prefix' to override default prefix in manifest (#20409)" (#25462) 2025-04-28 08:34:49 +05:00
Jordan Borean 352fd38c3b Update Get-Service to ignore common errors when retrieving non-critical properties for a service (#24245) 2025-04-21 14:17:11 -07:00
Armaan Mcleod 5c8b174709 Refactor Tooltip/ListItemText mapping to use CompletionDisplayInfoMapper delegate (#25395) 2025-04-21 17:44:01 +05:00
Armaan Mcleod 92c6f7a632 Add single/double quote support for Join-String Argument Completer (#25283) 2025-04-21 09:48:33 +05:00
Jordan Borean dd1fb9167f Fix tab completion for env/function variables (#25346) 2025-04-12 11:04:18 +05:00
MartinGC94 0c96975d1e Exclude outvariable assignments within the same CommandAst when inferring variables (#25224) 2025-03-26 18:00:46 +00:00
MartinGC94 dea739cf99 Fix infinite loop in variable type inference (#25206) 2025-03-26 07:53:08 +05:00
MartinGC94 1ac3ff15ac Add tooltips for hashtable key completions (#17864) 2025-03-25 05:14:24 +00:00
Armaan Mcleod e308222e19 Fix WildcardPattern.Escape to escape lone backticks correctly (#25211) 2025-03-25 09:05:42 +05:00
Jordan Borean 93e053c57e Add PipelineStopToken to Cmdlet which will be signaled when the pipeline is stopping (#24620) 2025-03-24 14:36:05 -07:00
MartinGC94 0ca17fdacd Fix type inference of parameters in classic functions (#25172) 2025-03-18 13:23:49 +05:00
MartinGC94 1edd258e3b Improve assignment type inference (#21143) 2025-03-18 09:48:11 +05:00
Armaan Mcleod 48c34fc3a7 Convert -ChildPath parameter to string[] for Join-Path cmdlet (#24677) 2025-03-18 09:44:06 +05:00
Dongbo Wang ef64132f0a Fix TypeName.GetReflectionType() to work when the TypeName instance represents a generic type definition within a GenericTypeName (#24985) 2025-03-17 15:40:25 -07:00
MartinGC94 becdd61b3c Improve variable type inference (#19830) 2025-03-13 10:04:02 +00:00
MartinGC94 f7ae4229dc Fix parameter completion when script requirements fail (#17687) 2025-03-07 04:26:03 +00:00
MartinGC94 d820692939 Improve the completion for attribute arguments (#25129) 2025-03-06 13:09:40 +00:00
MartinGC94 650189e603 Fix completion that relies on pseudobinding in script blocks (#25122) 2025-03-05 19:42:29 +00:00
MartinGC94 6661f6f100 Don't complete duplicate command names (#21113) 2025-03-04 12:57:39 +00:00
Dongbo Wang 6e428a8820 Set standard handles explicitly when starting a process with -NoNewWindow (#25061) 2025-03-03 16:17:16 -08:00
Jordan Borean 05214da717 Fix tooltip for variable expansion and include desc (#25112) 2025-03-03 09:23:24 +05:00
MartinGC94 33ed509ca4 Add type inference for functions without OutputType attribute and anonymous functions (#21127) 2025-02-28 17:48:59 +00:00