Commit Graph
2608 Commits
Author SHA1 Message Date
xtqqczze 44d366adb2 Remove obsolete CA1703 rule suppression (#25955) 2025-09-02 03:31:08 +00:00
xtqqczze 06ff422d2a Remove obsolete CA2240 rule suppression (#25957) 2025-09-02 03:26:45 +00:00
xtqqczze 3b6f267e19 Remove obsolete CA2233 rule suppression (#25951) 2025-09-01 03:56:16 +00:00
xtqqczze eda56e282e Remove obsolete CA1026 rule suppression (#25934) 2025-08-31 23:20:07 +05: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
xtqqczze 8d524adf7f Remove obsolete CA2118 rule suppression (#25924) 2025-08-29 10:57:40 +05:00
xtqqczze cf2d7021ab Remove redundant System.Runtime.Versioning attributes (#25926) 2025-08-28 05:54:18 +00:00
Dongbo Wang 44e34f0044 Change the default feedback provider timeout from 300ms to 1000ms (#25910) 2025-08-26 16:06:23 -07:00
PowerShell Team Bot 2fb12a31f3 Update PowerShell to use .NET SDK v10-preview.7 (#25876) 2025-08-20 14:38:09 -07: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
Dongbo Wang f4a452ea3c Update PSRP protocol to deprecate session key exchange between newer client and server (#25774) 2025-08-06 22:54:11 +00:00
PowerShell Team Bot 5de50164c9 Update to .NET 10 Preview 6 (#25828) 2025-08-06 22:28:13 +00:00
Jordan Borean 8dd0d2acf8 Fix the ssh PATH check in SSHConnectionInfo when the default Runspace is not available (#25780) 2025-08-04 16:37:45 -07:00
Steve Lee 65b899c3a9 Fix Write-Host to respect OutputRendering = PlainText (#21188) 2025-08-04 16:31:59 -07: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
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
Dongbo Wang b801027560 Revert "Never load a module targeting the PSReadLine module's SessionState" (#25792)
The change causes nested modules of PSReadLine to be loaded to global session state as well.

It's possible to check if we are currently importing the PSReadLine module but the check would depend on the current design of the PSReadLine module, such as how many nested modules it has, its module type, and etc., which is fragile. It's safer to just revert the change.
2025-07-29 14:32:21 -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
MartinGC94 21f88b50f4 Fix infinite loop crash in variable type inference (#25696) 2025-06-30 16:22:49 -04: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
PowerShell Team BotandDongbo Wang 82f016ffe2 Move to .NET 10 preview 4 and update package references (#25602)
Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
2025-06-03 09:50:33 -07: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
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
Ilya 7d6b6d8bf3 Add internal methods to check Preferences (#25514) 2025-05-08 00:10:05 +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
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
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
68a5fdba3d Update to .NET 10.0.100-preview.3 (#25358)
Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
Co-authored-by: Justin Chung <124807742+jshigetomi@users.noreply.github.com>
2025-04-17 20:27:30 +00:00
Anam Navied 4e3875c378 Add CodeQL suppressions for PowerShell intended behavior (#25359) 2025-04-15 01:52:00 +00: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
Armaan Mcleod 84369c7b55 Refactor and add comments to CompletionRequiresQuotes to clarify implementation (#25223) 2025-03-26 11:16:58 +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
Patrick MeineckeandTravis Plunk dc0f399f73 Fallback to AppLocker after WldpCanExecuteFile (#24912)
Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
2025-03-24 14:13:22 -07:00
PowerShell Team BotandTravis Plunk 94a37db4cb Update .NET SDK to 10.0.100-preview.2 (#25225)
Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
2025-03-24 21:06:42 +00:00
Armaan Mcleod 94d0361d59 Add QuoteCompletionText method to CompletionHelpers class (#25180)
Unifies how quoting a given completion text works.
2025-03-22 18:04:54 +05:00
Aditya Patwardhan eef334de1b Bump .NET to 10 preview.1 (#25154) 2025-03-19 15:48:08 -07:00
Dongbo Wang a6005f3879 Move .NET method invocation logging to after the needed type conversion is done for method arguments (#25022) 2025-03-18 11:43:44 -07:00
MartinGC94 0ca17fdacd Fix type inference of parameters in classic functions (#25172) 2025-03-18 13:23:49 +05:00