* commands: make rvpa -relative do not return ./absolute_path
This happens on Windows when $pwd and -path is on different drive
* only return relative path inside current root
1. Add a null check in the tab completion code on the binding result returned from `PseudoParameterBinder`;
2. Add a null check in `CommandDiscovery.LookupCommandProcessor` on the `CommandInfo` object returned from the method `LookupCommandInfo`.
For a PropertyOnlyAdapter, the property may come from various sources, but methods, including parameterized properties, still come from DotNetAdapter. So, the binder can optimize on method calls for objects that map to a custom PropertyOnlyAdapter.
Add support for replacement lambdas when using the -replace operator.
Requires minimal changes to existing code by using the following overload:
Regex.Replace(string input, MatchEvaluator evaluator)
when a ScriptBlock is passed in as the replacement argument.
Also remove a couple of language tests which were actually duplicated
Change the one loop which loops through test cases to include an iteration number to remove test name duplication
* Tests for Get-Process cmdlet.
* Tests for Get-Process run as admin.
* Skipping some Get-Process tests on Linux
* Skip test for -FileVersionInfo parameter for Linux because of the bug that cause the command to hang.
* Add checks for ErrorId in Get-Process tests
* Change one Get-Process test status to pending for MacOs
Some CI level 'Save-Help' tests were disabled in #2806 because HelpInfo URIs for powershell modules were broken (tracked by #2807). However, they were forgotten to be enabled when the URI issue was fixed. This PR reenables those tests.
- The original change to remove extra padding didn't take into account alignment.
Fix logic to accommodate left, center, and right alignment in the table format and also add tests.
- Fix ImplicitRemoting test that validates formatting to use same instance due to formatting changes in this PR
- Only use loopback to same powershell instance for formatting test as the other tests implicitly expect Windows PowerShell.
- Fixes issue #4634 by throwing a terminating error as agreed.
- Makes the command not rely on the presence of the TEMP environment variable to get path to temp directory and use the .Net method Path.GetTempPath() instead.
- Catch exception more specific as given by the documentation
- Improve existing test.
* add common write aliases
* add Message alias to the MessageData parameter for Write-Information
add Msg and Message alias to the Object perameter for Write-Host
* Add tests for new aliases
When a charset is not supplied for a JSON response, the default encoding should be UTF-8 per RFC 8259. This commit changes the default charset to UTF-8 for JSON responses when a charset is not defined.
Based on standard practices, we need to have a copyright and license notice at the top of each source file. Removed existing copyrights and updated/added copyright notices for .h, .cpp, .cs, .ps1, and .psm1 files.
Updated module manifests for consistency to have Author = "PowerShell" and Company = "Microsoft Corporation". Removed multiple line breaks.
Separate PR coming to update contribution document for new source files: #6140
Manually reviewed each change.
Fix#6073
Breaking-change: "0".."9" returns [char] previously in PowerShell Core (6.0.0, 6.0.1), now it returns [int]. After the change, the behavior is the same as in Windows PowerShell.
* get-childitem <PATH>/* -file should include <Path> as search directory
* [Feature] Added check for -Directory and more tests
* [Feature] Added check for the dynamic parameter type