Commit graph

5745 commits

Author SHA1 Message Date
Jason Shirk
b1080860a4 Remove AllScope from most default aliases (#5268)
* Remove AllScope from most default aliases

To speed up scope creation, I removed AllScope from most default
aliases.

This results in a 15-20% speedup for:

    function foo {}
    for ($i = 0; $i -lt 100kb; $i++) { & { foo } }

I left AllScope of a few frequently used aliases because it does
make command lookup faster. If we introduce something like dynamic
sites for command lookup, then we could probably remove the rest
of the AllScope aliases.

This is a low-risk breaking change. One can ask for aliases at
a particular scope:

    Get-Alias -Scope 1 nsn

This could now fail if the scope number doesn't correspond to global
scope.
2017-10-30 20:05:49 -07:00
Aditya Patwardhan
a8008f8cbb Revert "Add macos launcher. (#5138)" (#5259) 2017-10-30 15:38:14 -07:00
Travis Plunk
8702dea03b Sync tags in release build so that shallow cloning can be enabled. (#5248) 2017-10-30 10:06:47 -07:00
xa0082249956
11e50c1d5d Update README.md for binary package beta.9 (#5267)
In README.md
* Update binary package for beta.9
* Add link for `[rl-macos-tar]` and `[rl-linux-tar]`
2017-10-30 10:00:31 -07:00
Steve Lee
33b4e67d37 Change VSCode build task to use pwsh (#5255) 2017-10-30 09:58:44 -07:00
Steve Lee
a384c6ea11 Change to not insert line breaks to output (except for tables) (#5193) 2017-10-30 09:54:44 -07:00
Jason Shirk
8234e3cd19
Remove CommandFactory (#5266)
The class CommandFactory served no real purpose in command lookup
other than to unnecessarily add a few frames to the call stack,
introduce an extra indirection, and add a couple of unnecessary
checks that essential instances like ExecutionContext are not null.
2017-10-28 21:01:47 -07:00
Mathias R. Jessen
9b32c1d039 Add char range overload to DotDot operator (#5026) 2017-10-28 10:47:10 -07:00
Travis Plunk
14af3e1297
update docker file for nanoserver 1709 release (#5252) 2017-10-27 11:57:21 -07:00
Travis Plunk
ce03a6c2be
Make sure web hook gets called (#5249)
if something goes wrong during the build, we might exit and not update the badge or fire the webhook.

Enable the after_success and after_failure stages of the travis-ci build so we can have a better chance of getting these done.
2017-10-27 11:35:40 -07:00
Steve Lee
4df703616a use rcedit to embed icon and version information into pwsh.exe (#5178)
pwsh.exe today doesn't contain file version information and the icon is only associated with the shortcut file and not the exe

Fix is to use rcedit to embed:

icon
product version
file version
product name
copyright
Fix #2883
Fix #5166
Fix #5034
2017-10-26 21:52:08 -07:00
Steve Lee
967ed8b664 Fix 'Import-module' to not report a loaded module was not found (#5238)
Missed a 'break' statement after the module was loaded successfully, so the loop continues when it shouldn't.
2017-10-26 14:16:47 -07:00
Steve Lee
7407a9e300 Fix 'get-item -literalpath a*b' to return error if a*b doesn't actually exist (#5197) 2017-10-26 14:14:46 -07:00
Steve Lee
4bc52d2358 Use consistent '(c)' for copyright symbol (#5210)
- Remove the year about copyright
- Fix casing of `All rights reserved`
- Replace Unicode characters representing single quote with a single quote
2017-10-26 14:12:19 -07:00
Steve Lee
b1af9ea230 -Verbose should not override $ErrorActionPreference (#5113)
* -Verbose should not override $ErrorActionPreference

* apply same fix to -debug and added test case

* address Aditya's feedback
2017-10-26 13:40:14 -07:00
Roma Marusyk
282deb7ee1 Export-Csv Test Improvements (#5150) 2017-10-26 08:56:07 +04:00
Travis Plunk
00dde3d8f2 Add term rules (#5213)
* Add Terms Rules

* remove offensive term

* Add code owner for compliance files
2017-10-25 15:08:52 -07:00
Sergei Vorobev
0c98b7e963 Remove @vors from engine area owners. Add the Language area. (#5223) 2017-10-25 14:05:19 -07:00
bergmeister
715fe94c37 Fix 'demos/SSHRemoting/README.md' using the new name 'pwsh' (#5236) 2017-10-25 14:03:43 -07:00
Dongbo Wang
a5f4a5607b Merge beta.9 release branch to master 2017-10-25 09:22:43 -07:00
bergmeister
f5f0d3afc5 Add -AsHashtable switch to ConvertFrom-Json for issue #3623 (#5043)
Address #3623.

Implementation symmetric to traditional code path that returns a PSCustomObject. Code is shared on the top level but 2 low level methods were difficult to share, therefore 2 separate but similar methods were created for HashTables.
All existing tests related to this change were adapted to also test against this new switch and were slightly improved.

-AsHashtable is an existing pattern used in Group-Object
2017-10-25 08:57:05 -07:00
Dongbo Wang
bfce69ed83 Update install/build scripts and dockerfiles (#5222) 2017-10-25 08:25:35 -07:00
Dongbo Wang
44f0296f85 Update ChangeLog for beta.9 release (#5216) 2017-10-24 17:35:13 -07:00
Aditya Patwardhan
d0806811e4 Update docs and scripts for beta.9 (#5217) 2017-10-24 16:28:22 -07:00
Dongbo Wang
1702358e75 Update installation doc and README.md to include the powershell binary archive packages (#5212)
* Update README.md

* Update docs for powershell binary archive packages

* Update the chart
2017-10-24 11:13:17 -07:00
Jonas Andersen
ca30054761 Added BinPath, Description, UserName and Delayed Auto Start to Get-Service (#4907)
Added the following to the  Get-Service  command:
•BinaryPathName (Was suggested as  ServicePath )
•Description
•UserName (Was suggested as  LogOnAs )
•DelayedAutoStart
•ServiceStartupType

The ServiceStartupType was also added, providing the user access to use services like in  services.msc , having  Automatic ,  Automatic (Delayed Start) ,  Manual  and  Disabled  as options (Also includes  InvalidValue  as an initial value for  ServiceStartupType )
2017-10-24 10:54:07 +04:00
Dongbo Wang
e4d88aaa9d Fix appimage package name to be lower case 'powershell-..' (#5206) 2017-10-23 21:40:39 -07:00
James Truher [MSFT]
be700729d6 Unify cmdlets with parameter 'Encoding' to be of type System.Text.Encoding (#5080)
This unifies file encoding across the inbox cmdlets to be UTF-8 without a BOM for all platforms. This is a breaking change as cmdlets on windows have a number of different encodings. This supports better interoperability with tradition Linux shells as we are using the same encoding.

Validate that files are created with UTF-8 encoding without BOM
Update tests to validate Encoding parameter to new type and create new tests for
parameter type validation.

[Breaking Change] The '-Encoding Byte' has been removed from the filesystem provider cmdlets. A new parameter '-AsByteStream' is now added to indicate that a byte stream is required as input, or output will be a stream of bytes.
2017-10-23 19:46:27 -07:00
Steve Lee
d85b9a472c Put command discovery before scripts for Unix (#5116)
* put command discovery before scripts for Unix

* remove unnecessary test
2017-10-23 17:54:28 -07:00
Travis Plunk
8051977ef5 Log sending daily web hook. (#5203)
Make sure we count xunit tests failures as a CI failure.
2017-10-23 13:58:03 -07:00
Dongbo Wang
1f75e81e4c Update docker files and related due to the name change (#5156) 2017-10-23 12:33:07 -07:00
Travis Plunk
14af252878 Update packaging to only package PowerShell binaries when packaging symbols (#5145)
* Update packaging script to only package PowerShell binaries when creating symbols zip.  disallow all other package types for symbols

* remove instrumentation used for debugging during development

* Add error action silently continue to cleanup for reliability.

* Add comment about why folder is being deleted.
2017-10-23 12:30:25 -07:00
Joshua King
c98fe394ec Make Get-ChildItem honor Depth parameter with Include/Exclude (#4985)
* Add depth to ProcessPathItems

* Honors capped recursion when using Include or Exclude filters with Get-ChildItem

* Including test cases to test include/exclude recursion

* Swap optional parameter for overload
2017-10-23 12:22:05 -07:00
Keith Hill
6acbf5c5e4 Add global.json to pick correct SDK version (#5118) 2017-10-23 11:22:12 -07:00
Andrew
e0af4d96d8 Add example of how to create a .net core cmdlet with Visual Studio (#5096) 2017-10-23 09:35:28 -07:00
Steve Lee
17c16ce4c5 Fix vscode launch.json to point to pwsh (#5189) 2017-10-23 09:29:48 -07:00
Aditya Patwardhan
df06200be5 Add new Fwlinks for v6 help content (#4978)
Updated fwlinks to pull new help content for PSv6.
Fwlink for Microsoft.PowerShell.Core module is not updated since about_*help.txt is not available yet.
2017-10-23 09:28:17 -07:00
Dongbo Wang
5b2bbcbf89 Update the help text with the new name 'pwsh' (#5182) 2017-10-21 13:50:00 +04:00
Mark Kraus
9fd600448c Make -NoTypeInformation Default on Export-Csv and ConvertTo-Csv (#5164)
•Sets  -NoTypeInformation  as the default behavior for  Export-Csv  and  ConvertTo-Csv 
•Hides the  -NoTypeInformation  parameter switch
•Adds  -IncludeTypeInformation  switch to  Export-Csv  and  ConvertTo-Csv  to enable legacy behavior
•Provides a terminating error when both  -NoTypeInformation  and  -IncludeTypeInformation  are supplied
•adds tests for the new behavior
•fixes existing tests to align with new behavior

The new behavior will need to be documented.
2017-10-21 13:41:46 +04:00
Travis Plunk
13eb283560 Add code to send WebHook for Travis-CI Daily Build (#5183) 2017-10-20 15:06:37 -07:00
Dan Travison
053d180817 Add exports for syslog APIs in 'libpsl-native'. (#5149) 2017-10-20 09:03:59 -07:00
Dave Wyatt
1c469aaa22 Unwrap 'ValueFromRemainingArguments' if the single element is a collection (#5109)
Unwrapping of 'ValueFromRemainingArguments' was being performed only for 'object[]' arrays (which covers the most common PowerShell binding scenarios) but could be skipped if a collection of any other type were passed to the parameter. This change unwraps 'ValueFromRemainingArguments' if the single element is a collection.
2017-10-19 16:44:26 -07:00
Greg Zimmerman
5913069e58 Update powershell to pwsh. (#5174) 2017-10-19 15:09:57 -07:00
Dongbo Wang
2fd484f491 Update the man help file used in packaging (#5173)
* Update pacakging.psm1 and rename man file

* Update pwsh.1.ronn
2017-10-19 15:09:16 -07:00
Steve Lee
e908b8a607 Enable import-module to be case insensitive (#5097)
Fix #1621 

Enable import-module to be case insensitive as macOS is case insensitive.
2017-10-19 14:44:21 -07:00
Dongbo Wang
59b5d16139 Update appimage.sh to reflect the new name 'pwsh' (#5172) 2017-10-19 12:32:55 -07:00
Keith Hill
ca2630a3de Add document about how to create cmdlet w/dotnet CLI (#5117) 2017-10-19 11:32:40 -07:00
Steve Lee
847846d834 [feature] (#4960)
remove -computer support since corefx Process.GetProcesses(computer) returns local processes
2017-10-18 15:49:45 -07:00
Mark Kraus
b4e8e9d06b Replace HttpBin.org/response-headers Tests with WebListener (#5058) 2017-10-18 12:24:02 -07:00
Greg Zimmerman
01fe7c24eb Add macos launcher. (#5138) 2017-10-18 12:22:07 -07:00