Skip to content

Commit 4958c67

Browse files
Merge pull request #214 from StartAutomating/Posh-Updates
Posh 0.1.5: Posh Issues and Discussions
2 parents db88d8a + 2544329 commit 4958c67

13 files changed

+182
-109
lines changed

.github/ISSUE_TEMPLATE/Bug.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Bug Report
22
description: Report a Problem
3-
title: ""
3+
title: "Bug -"
44
labels: ["bug"]
55
body:
66
- type: markdown

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## Posh 0.1.5: Posh Issues and Discussions
2+
3+
* Adding PSModuleInfo.Discussion (Fixes #212)
4+
* Adding PSModuleInfo.Issue (Fixes #137)
5+
* Improving Issue Templates
6+
* Adding Stefan Stanger's Blog to $Posh.News (#209) (thanks @stefanstranger !)
7+
* Adding RTPSUG Video to Posh (#213) (`$posh.Video`)
8+
9+
---
10+
111
## Posh 0.1.4: Some Posh News
212

313
* Added .News to every module (#173)

Formatting/Reflection/TypeEventControl.format.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
Write-FormatViewExpression -If { $_.EventHandlerType.GetMethod('Invoke') } -ScriptBlock {
77
$MethodParameters = @($_.EventHandlerType.GetMethod('Invoke').GetParameters())
88
foreach ($n in 0..($MethodParameters.Count - 1)) {
9+
if (-not $MethodParameters[$n]) { continue }
910
$o =[PSObject]::new($MethodParameters[$n])
1011
$o.psobject.properties.add([PSNoteProperty]::new('N', $N))
1112
$o

Formatting/Reflection/TypeMethodControl.format.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
Write-FormatViewExpression -ScriptBlock {
1010
$MethodParameters = @($_.GetParameters())
1111
foreach ($n in 0..($MethodParameters.Count - 1)) {
12+
if (-not $MethodParameters[$n]) { continue }
1213
$o =[PSObject]::new($MethodParameters[$n])
1314
$o.psobject.properties.add([PSNoteProperty]::new('N', $N))
1415
$o

Posh.format.ps1xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ $script:TreeDepth++;</ScriptBlock>
259259
<ScriptBlock>
260260
$MethodParameters = @($_.EventHandlerType.GetMethod('Invoke').GetParameters())
261261
foreach ($n in 0..($MethodParameters.Count - 1)) {
262+
if (-not $MethodParameters[$n]) { continue }
262263
$o =[PSObject]::new($MethodParameters[$n])
263264
$o.psobject.properties.add([PSNoteProperty]::new('N', $N))
264265
$o
@@ -505,6 +506,7 @@ $script:TreeDepth++;</ScriptBlock>
505506
<ScriptBlock>
506507
$MethodParameters = @($_.GetParameters())
507508
foreach ($n in 0..($MethodParameters.Count - 1)) {
509+
if (-not $MethodParameters[$n]) { continue }
508510
$o =[PSObject]::new($MethodParameters[$n])
509511
$o.psobject.properties.add([PSNoteProperty]::new('N', $N))
510512
$o

Posh.psd1

Lines changed: 19 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@{
2-
ModuleVersion = '0.1.4'
2+
ModuleVersion = '0.1.5'
33
FormatsToProcess = 'Posh.format.ps1xml'
44
TypesToProcess = 'Posh.types.ps1xml'
55
RootModule = 'Posh.psm1'
@@ -15,6 +15,16 @@
1515
IconURI = 'https://raw.githubusercontent.com/StartAutomating/Posh/main/Assets/Posh.png'
1616
Tags = 'Posh', '.ps1xml', 'Format','Output','Types', 'Colorized', 'Prompt', 'Customization'
1717
ReleaseNotes = @'
18+
## Posh 0.1.5: Posh Issues and Discussions
19+
20+
* Adding PSModuleInfo.Discussion (Fixes #212)
21+
* Adding PSModuleInfo.Issue (Fixes #137)
22+
* Improving Issue Templates
23+
* Adding Stefan Stanger's Blog to $Posh.News (#209) (thanks @stefanstranger)
24+
* Adding RTPSUG Video to Posh (#213) (`$posh.Video`)
25+
26+
---
27+
1828
## Posh 0.1.4: Some Posh News
1929
2030
* Added .News to every module (#173)
@@ -26,111 +36,7 @@ Also, added tests (#204).
2636
2737
---
2838
29-
## Posh 0.1.3: Posh Tips and Tricks
30-
31-
* New Formatting:
32-
* Adding Select-XML Formatter (#107)
33-
* Posh.Preset.Collection (#153)
34-
* Posh.Tip.Command (#166)
35-
* Updated Formatting:
36-
* Making DirectoryIcon customizable / changing default to triangle (#169)
37-
* Integrating Tips/Links into Posh Formatting (#165)
38-
* Improving Formatting of Select-String (#109) (thanks @mdgrs-mei ! )
39-
* Added Tips and Tricks to Modules (#118) and added the first round of tips/tricks:
40-
* NegativeIndexingFibonacci Trick (#168)
41-
* GenericTypes Tip (#167)
42-
* Ordered Hashtables Tip (#156)
43-
* Hashtables Tip (#155)
44-
* AssigningLoopOutput Tip (#145)
45-
* RangeOperator Tip (#151)
46-
* NegativeIndex Tip (#150)
47-
* TernaryOperator Tip (#148)
48-
* Creating PsuedoObjects Trick (#144)
49-
* AssigningIfStatements Tip (#144)
50-
* Tip - Trinity of Discoverability (#142)
51-
* Tip - You Can Get Help On a Script (#147)
52-
* Tip - Everything Is An Object (#140)
53-
* Trick - The Parameter Set That Was Not There (#141)
54-
* Multiple Assignment Tip (#143)
55-
* LoopLabels Tip (#146)
56-
* see issues #166
57-
* New Extended Types:
58-
* Posh.Preset.Collection (#153)
59-
* Posh.Preset.Command (#154)
60-
* Posh.ExtensionCollection
61-
* .Count (#162)
62-
* .Refresh() (#123)
63-
* .Random (#124)
64-
* .All (#128)
65-
* get/set .CommandType (#127)
66-
* get/set .Path (#126)
67-
* get/set Module (#125)
68-
* Updated Extended Types
69-
* PSModuleInfo.Link (#64/#157/#158/#159/#160)
70-
* PSModuleInfo.Preset (#64/#153)
71-
* PSModuleInfo.Tip(s)/Trick(s) (#119, #120)
72-
* $Posh.Host.get/set_Title (#130)
73-
* Fixing stackable functions (#110, thanks @mdgrs-mei !)
74-
* Updating Posh.Preset.Command.Use help (#154)
75-
* Adding FileIcons Preset (#163)
76-
* Making TabExpansion Stackable (#116)
77-
78-
---
79-
80-
## Posh 0.1.2:
81-
82-
* New Demos
83-
* Posh.demo.ps1 (#95)
84-
* Posh.Prompt.demo.ps1 (#96)
85-
* Posh Profile Customization (#97)
86-
* New formatters:
87-
* Adding Formatting for Match (#100)
88-
* Adding Variable Formatting (#102)
89-
* Extending Modules
90-
* Adding PSModuleInfo.Test(s) (#104)
91-
* Prompt Customization:
92-
* Posh.Prompt.Undo() (#103)
93-
* Profile Customization:
94-
* Posh.Profiles.RemoveModule (#105)
95-
* Posh.Profiles.New() (#101)
96-
* Posh.Profile.ImportModule (#93)
97-
* Posh.Profile.Matches (#99)
98-
* Posh.Profile.Replace (#92)
99-
* Posh.Profile.get_File (#76)
100-
101-
---
102-
103-
## Posh 0.1.1:
104-
105-
* Posh can be sponsored (please show your support) (#77)
106-
* Added $Posh.Recommends (#65)
107-
* Added LinkedIn to $Posh.Resources (#66)
108-
* Added Logo (#67)
109-
* Expanding $Posh.Parameters (#68)
110-
* Adding LocalTime to TimeZone formatting (#84, #85)
111-
* $LastOutput/$LastOutputError (#74)
112-
* Adding $profile.Directory (#75)
113-
* Expanding PSModuleInfo
114-
* Recommendations (#65)
115-
* Screenshots (#79)
116-
* Videos (#80)
117-
* Demos (#81)
118-
* Logo (#89)
119-
120-
---
121-
122-
## Posh 0.1:
123-
124-
* Initial Version of Posh, including:
125-
* Customizable prompts
126-
* Easier access to PowerShell Error history
127-
* Formatting:
128-
* Reflection formatter
129-
* Get-Member in Color
130-
* Colorized XML
131-
* Colorized File View (with Icons!) (no NerdFonts required)
132-
* Colorized Regex
133-
* Process HeatMap
39+
More History in [CHANGELOG](CHANGELOG.md)
13440
'@
13541
}
13642
FileTypes = @{
@@ -168,6 +74,10 @@ Also, added tests (#204).
16874
'PowerShell LinkedIn' = 'https://www.linkedin.com/feed/hashtag/?keywords=powershell'
16975
}
17076

77+
Video = @{
78+
"Improving the Shell Experience (from RTPSUG)" = "https://www.youtube.com/watch?v=iZgcTD_uN-w"
79+
}
80+
17181
News =
17282
@{"PowerShell Blog" = "https://devblogs.microsoft.com/powershell/feed/"},
17383
@{"Evotec"="https://evotec.xyz/feed/"},
@@ -180,9 +90,10 @@ Also, added tests (#204).
18090
@{"The Lonely Administrator" = "https://jdhitsolutions.com/blog/feed/"},
18191
@{"MDGRS Factory"="https://mdgrs.hashnode.dev/rss.xml"},
18292
@{"Pipe How"="https://pipe.how/index.xml"},
183-
@{"PowerShell is Fun"="https://powershellisfun.com/feed/"}
93+
@{"PowerShell is Fun"="https://powershellisfun.com/feed/"},
94+
@{"Stefan Stranger"="https://stefanstranger.github.io/feed"}
18495

185-
# Got more News? Feel free to file and issue and open a PR to add your feed.
96+
# Got more News? Feel free to file an issue and open a PR to add your feed.
18697

18798
# Any module can contain it's own .News.
18899
# If Posh and that module are loaded, your module will have .News/.Feed/.RSS properties.

Posh.types.ps1xml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2745,10 +2745,18 @@ $posh.ExecutionContext.SessionState.PSVariable.Set("function:$($this.FunctionNam
27452745
<Name>Demos</Name>
27462746
<ReferencedMemberName>Demo</ReferencedMemberName>
27472747
</AliasProperty>
2748+
<AliasProperty>
2749+
<Name>Discussions</Name>
2750+
<ReferencedMemberName>Discussion</ReferencedMemberName>
2751+
</AliasProperty>
27482752
<AliasProperty>
27492753
<Name>Feed</Name>
27502754
<ReferencedMemberName>News</ReferencedMemberName>
27512755
</AliasProperty>
2756+
<AliasProperty>
2757+
<Name>Issues</Name>
2758+
<ReferencedMemberName>Issue</ReferencedMemberName>
2759+
</AliasProperty>
27522760
<AliasProperty>
27532761
<Name>Links</Name>
27542762
<ReferencedMemberName>Link</ReferencedMemberName>
@@ -2879,6 +2887,46 @@ $this |
28792887
Select-Object -Unique
28802888
</GetScriptBlock>
28812889
</ScriptProperty>
2890+
<ScriptProperty>
2891+
<Name>Discussion</Name>
2892+
<GetScriptBlock>
2893+
&lt;#
2894+
.SYNOPSIS
2895+
Gets a module's discussions URL.
2896+
.DESCRIPTION
2897+
Gets the discussions URL related to a module.
2898+
.NOTES
2899+
The Module must set it's ProjectURI, and it must be on GitHub, or this will return nothing.
2900+
#&gt;
2901+
if ($this.ProjectURI.Host -eq 'github.com') {
2902+
[PSCustomObject][Ordered]@{
2903+
Name = "$($this.Name) Discussions"
2904+
Url = "$($this.ProjectURI)/discussions"
2905+
PSTypeName = 'Posh.Module.Link'
2906+
}
2907+
}
2908+
</GetScriptBlock>
2909+
</ScriptProperty>
2910+
<ScriptProperty>
2911+
<Name>Issue</Name>
2912+
<GetScriptBlock>
2913+
&lt;#
2914+
.SYNOPSIS
2915+
Gets a module's issue URL.
2916+
.DESCRIPTION
2917+
Gets the issues URL related to a module.
2918+
.NOTES
2919+
The Module must set it's ProjectURI, and it must be on GitHub, or this will return nothing.
2920+
#&gt;
2921+
if ($this.ProjectURI.Host -eq 'github.com') {
2922+
[PSCustomObject][Ordered]@{
2923+
Name = "$($this.Name) Issues"
2924+
Url = "$($this.ProjectURI)/issues"
2925+
PSTypeName = 'Posh.Module.Link'
2926+
}
2927+
}
2928+
</GetScriptBlock>
2929+
</ScriptProperty>
28822930
<ScriptProperty>
28832931
<Name>Link</Name>
28842932
<GetScriptBlock>

Types/PSModuleInfo/Alias.psd1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@
1313
Presets = 'Preset'
1414
RSS = 'News'
1515
Feed = 'News'
16+
Discussions = 'Discussion'
17+
Issues = 'Issue'
1618
}

Types/PSModuleInfo/get_Discussion.ps1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<#
2+
.SYNOPSIS
3+
Gets a module's discussions URL.
4+
.DESCRIPTION
5+
Gets the discussions URL related to a module.
6+
.NOTES
7+
The Module must set it's ProjectURI, and it must be on GitHub, or this will return nothing.
8+
#>
9+
if ($this.ProjectURI.Host -eq 'github.com') {
10+
[PSCustomObject][Ordered]@{
11+
Name = "$($this.Name) Discussions"
12+
Url = "$($this.ProjectURI)/discussions"
13+
PSTypeName = 'Posh.Module.Link'
14+
}
15+
}

Types/PSModuleInfo/get_Issue.ps1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<#
2+
.SYNOPSIS
3+
Gets a module's issue URL.
4+
.DESCRIPTION
5+
Gets the issues URL related to a module.
6+
.NOTES
7+
The Module must set it's ProjectURI, and it must be on GitHub, or this will return nothing.
8+
#>
9+
if ($this.ProjectURI.Host -eq 'github.com') {
10+
[PSCustomObject][Ordered]@{
11+
Name = "$($this.Name) Issues"
12+
Url = "$($this.ProjectURI)/issues"
13+
PSTypeName = 'Posh.Module.Link'
14+
}
15+
}

docs/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## Posh 0.1.5: Posh Issues and Discussions
2+
3+
* Adding PSModuleInfo.Discussion (Fixes #212)
4+
* Adding PSModuleInfo.Issue (Fixes #137)
5+
* Improving Issue Templates
6+
* Adding Stefan Stanger's Blog to $Posh.News (#209) (thanks @stefanstranger !)
7+
* Adding RTPSUG Video to Posh (#213) (`$posh.Video`)
8+
9+
---
10+
111
## Posh 0.1.4: Some Posh News
212

313
* Added .News to every module (#173)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
System.Management.Automation.PSModuleInfo.get_Discussion()
2+
----------------------------------------------------------
3+
4+
5+
6+
7+
### Synopsis
8+
Gets a module's discussions URL.
9+
10+
11+
12+
---
13+
14+
15+
### Description
16+
17+
Gets the discussions URL related to a module.
18+
19+
20+
21+
---
22+
23+
24+
### Notes
25+
The Module must set it's ProjectURI, and it must be on GitHub, or this will return nothing.
26+
27+
28+
29+
---
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
System.Management.Automation.PSModuleInfo.get_Issue()
2+
-----------------------------------------------------
3+
4+
5+
6+
7+
### Synopsis
8+
Gets a module's issue URL.
9+
10+
11+
12+
---
13+
14+
15+
### Description
16+
17+
Gets the issues URL related to a module.
18+
19+
20+
21+
---
22+
23+
24+
### Notes
25+
The Module must set it's ProjectURI, and it must be on GitHub, or this will return nothing.
26+
27+
28+
29+
---

0 commit comments

Comments
 (0)