Commit Graph
3655 Commits
Author SHA1 Message Date
Thomas Nieto bedd3bc287 Remove AssemblyInfo property from list views (#13331) 2020-08-05 12:17:09 -07:00
xtqqczze aa43d867af Switch to MIT license for files copied from Roslyn (#13305) 2020-08-05 10:51:57 -07:00
Dongbo Wang 63cf0c330c Allow explicitly specified named parameter to supersede the same one from hashtable splatting (#13162)
Allow explicitly specified named parameter to supersede the same one from hashtable splatting.
The work is done in parameter binder, so that parameters can be resolved to cover a parameter's official name, alias name, and unambiguous partial prefix name.

The changes covers covers Hashtable splatting in 3 scenarios:

- Cmdlet or advanced script invocation;
- Simple function invocation;
- ScriptBlock.GetPowerShell(...), where the script block contains command invocation only and uses Hashtable splatting.

Some code refactoring is done to ParameterBinderController to avoid redundant code being duplicated in CmdletParameterBinderController and ScriptParameterBinderController.
2020-08-05 10:59:53 +05:00
Christopher Yeleighton 7ed43d9c16 HelpSystem: Improve the wording of inline comments (#13274) 2020-08-04 15:11:10 -07:00
Joel Sallow (/u/ta11ow) 6aa08f9559 Improve BigInteger casting behaviours (#12629) 2020-08-04 10:45:36 +05:00
Shri Ram K S 9ceee3e52f Fix Get-Acl -LiteralPath "HKLM:Software\Classes\*" behaviour (#13107)
* Fix #11566 bug

Add pester test for Get-Acl cmdlet

* Replace -pending parameter with -skip

* Fix test failing in Linux and MacOS
2020-07-31 16:44:45 -07:00
xtqqczze 4597b41396 Use is not syntax where appropriate and remove unnecessary parentheses (#13323) 2020-07-31 16:41:59 -07:00
Dongbo Wang 4464d1b414 Add DefaultVisit method to the visitor interface and class (#13258) 2020-07-31 10:16:59 -07:00
Ilya 58b91a89b6 Fix conflicting shorthand switch -s (sta) for pwsh (#13262) 2020-07-31 09:40:42 -07:00
Steve Lee 99b3bfaa34 Change Read-Host -MaskInput to use existing SecureString path, but return as plain text (#13256) 2020-07-30 22:16:37 -07:00
xtqqczze 2eade89f25 Remove unreachable code in CustomShellCommands.cs (#13316) 2020-07-30 17:59:11 -07:00
Dongbo Wang 4b9b0788ed Revert "Use is null syntax (#13277)" (#13322)
This reverts commit 6c03776d74.
2020-07-30 16:06:38 -07:00
xtqqczze 7beec89f50 Add copyright header to .editorconfig and update files (#13306) 2020-07-30 09:47:21 -07:00
xtqqczze 6c03776d74 Use is null syntax (#13277)
Replace `== null` with `is null`
2020-07-30 18:04:03 +05:00
Dave Goldman 49e432db7a Fixing typo in Out-File.cs and Out-Printer.cs (#13298) 2020-07-29 11:14:16 -07:00
Dongbo Wang 74ddc3e8a1 Remove ComEnumerator as COM objects using IEnumerator is now supported in dotnet 5.0 (#13259) 2020-07-29 22:12:00 +05:00
Aditya Patwardhan f91e78ad69 Add default help content to the assets folder (#13257)
* Add default help content to the assets folder
* Reformatted and removed TechNet reference
2020-07-26 11:53:56 -07:00
Dongbo Wang cfb1952fd2 Use temp personal path at Runspace startup when env 'HOME' not defined (#13239) 2020-07-23 10:24:42 -07:00
xtqqczze 6ca0024db9 Fix SA1026CodeMustNotContainSpaceAfterNewKeywordInImplicitlyTypedArrayAllocation (#13249)
See https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1026.md
2020-07-23 22:19:15 +05:00
Dongbo Wang f6f966b3dc Fix Invoke-Command to detect recursive call of the same history entry (#13197) 2020-07-23 09:11:25 -07:00
Shri Ram K S a6bd47f031 Add password confirmation in Get-Credential (#12782)
* Add parameter -ReEnterPassword to prompt user to re-enter the password for confirmation

* Add new public overload function PromptForCredential
2020-07-22 19:13:42 +05:00
github-actions[bot] 9c396aa0ea Update .NET SDK version from 5.0.100-preview.7.20366.2 to 5.0.100-preview.7.20366.15 (#13200)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-07-22 18:53:33 +05:00
Kirk Munro 472943347d Add -Runspace parameter to all *-PSBreakpoint cmdlets (#10492) 2020-07-21 11:48:54 -07:00
dependabot-preview[bot] fdf5ddd0d5 Bump NJsonSchema from 10.1.23 to 10.1.24 (#13214)
Bumps [NJsonSchema](https://github.com/RicoSuter/NJsonSchema) from 10.1.23 to 10.1.24.
- [Release notes](https://github.com/RicoSuter/NJsonSchema/releases)
- [Commits](https://github.com/RicoSuter/NJsonSchema/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-21 08:43:24 +05:00
Ilya 8c22e5f7d0 Change exe '-inputformat' switch prefix '-in' to '-inp' to fix conflict with '-interactive' (#13205) 2020-07-20 12:16:00 -07:00
xtqqczze 2c18386d79 Avoid usage of do statement to create an infinite loop (#13137)
* Autofix RCS1063
2020-07-20 09:23:14 +05:00
github-actions[bot] 1ed554dde4 Update .NET SDK version from 5.0.100-preview.7.20364.3 to 5.0.100-preview.7.20366.2 (#13192) 2020-07-16 12:12:40 -07:00
Dongbo Wang f90712a317 Handle WSL filesystem path when analyze security zone of a file (#13120) 2020-07-13 13:05:01 -07:00
xtqqczze 8901d2a509 Cleanup: use int instead of uint in places where it's more appropriate (#13141) 2020-07-13 07:10:57 -07:00
PRASOON KARUNAN V a079c63af5 Make other switches mandatory in Split-Path (#13150) 2020-07-13 10:48:45 +05:00
xtqqczze e41a28c2bd Cleanup: Use int instead of long to avoid Interlocked.Read (#13069) 2020-07-10 11:43:41 -07:00
Ilya 5ad8a5916f Add support for some .NET intrinsic type converters (#12580) 2020-07-08 14:32:58 -07:00
github-actions[bot] 7da0742cb6 Update .NET SDK version from 5.0.100-preview.6.20318.15 to 5.0.100-preview.7.20356.2 (#13125) 2020-07-07 12:10:11 -07:00
Robert Holt d3addeb3da Fix Move-Item to support cross-mount moves on Unix (#13044) 2020-07-06 16:39:08 -07:00
xtqqczze 9aba45f18c Use null check with pattern-matching instead of object.ReferenceEquals (#13065) 2020-07-06 21:51:24 +05:00
Christopher Yeleighton babf02768b Fix error message from new symbolic link missing target (#13085) 2020-07-03 12:54:26 +05:00
Aditya PatwardhanandAditya Patwardhan 808bf22d2f Ensure assemblies listed FileList are not loaded (#12968)
Co-authored-by: Aditya Patwardhan <Aditya Patwardhan>
2020-06-30 10:16:13 -07:00
dependabot-preview[bot] 1de5e59e03 Bump NJsonSchema from 10.1.22 to 10.1.23 (#13032)
Bumps [NJsonSchema](https://github.com/RicoSuter/NJsonSchema) from 10.1.22 to 10.1.23.
- [Release notes](https://github.com/RicoSuter/NJsonSchema/releases)
- [Commits](https://github.com/RicoSuter/NJsonSchema/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-26 08:40:56 +05:00
xtqqczze bd90f1921f Code performance fixes (#12956)
* RCS1080: Use 'Count/Length' property instead of 'Any' method

* RCS1077: Optimize LINQ method call

* RCS1235: Optimize method call
2020-06-25 11:30:40 +05:00
dependabot-preview[bot] bf3b48db13 Bump NJsonSchema from 10.1.21 to 10.1.22 (#13022)
Bumps [NJsonSchema](https://github.com/RicoSuter/NJsonSchema) from 10.1.21 to 10.1.22.
- [Release notes](https://github.com/RicoSuter/NJsonSchema/releases)
- [Commits](https://github.com/RicoSuter/NJsonSchema/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-25 11:27:39 +05:00
Aditya Patwardhan 8030889b7b Update .NET SDK version from 5.0.100-preview.5.20279.10 to 5.0.100-preview.6.20318.15 (#13018) 2020-06-23 17:30:31 -07:00
Aditya Patwardhan 0d75cfdc2d Revert "Update .NET SDK version from 5.0.100-preview.5.20279.10 to 5.0.100-preview.6.20319.2 (#12992)" (#13017)
This reverts commit ce8dc1e30c.
2020-06-23 11:52:20 -07:00
Joel Sallow (/u/ta11ow) 02af121ca2 Fix issue in Select-Object where Hashtable members (e.g., Keys) cannot be used with -Property or -ExpandProperty (#11097) 2020-06-19 15:46:54 -07:00
github-actions[bot] ce8dc1e30c Update .NET SDK version from 5.0.100-preview.5.20279.10 to 5.0.100-preview.6.20319.2 (#12992) 2020-06-19 11:28:09 -07:00
xtqqczze eb9acbc952 Replace SortedList with Generic.SortedList<TKey,TValue> (#12954) 2020-06-19 14:50:31 +05:00
xtqqczze a15e5090e2 Use HashSet instead of Hashtable with null values (#12958) 2020-06-19 08:31:18 +05:00
Steve Lee 2f1d40c4ec Fix conflicting shorthand switch -w for pwsh (#12945) 2020-06-16 18:36:01 -07:00
Christopher Yeleighton 04b121471a Make the switch parameter -Qualifier not positional for Split-Path (#12960) 2020-06-16 10:28:41 -07:00
Ilya 409bd318f1 Rename the CimCmdlet resource file (#12955) 2020-06-15 11:00:02 -07:00
dependabot-preview[bot]andDongbo Wang ed4cd20d80 Bump PSReadLine from 2.0.1 to 2.0.2 (#12909)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
2020-06-12 13:07:41 -07:00