Skip to content

Commit

Permalink
Merge pull request #214 from StartAutomating/Posh-Updates
Browse files Browse the repository at this point in the history
Posh 0.1.5: Posh Issues and Discussions
  • Loading branch information
StartAutomating authored Aug 18, 2023
2 parents db88d8a + 2544329 commit 4958c67
Show file tree
Hide file tree
Showing 13 changed files with 182 additions and 109 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Bug.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Bug Report
description: Report a Problem
title: ""
title: "Bug -"
labels: ["bug"]
body:
- type: markdown
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## Posh 0.1.5: Posh Issues and Discussions

* Adding PSModuleInfo.Discussion (Fixes #212)
* Adding PSModuleInfo.Issue (Fixes #137)
* Improving Issue Templates
* Adding Stefan Stanger's Blog to $Posh.News (#209) (thanks @stefanstranger !)
* Adding RTPSUG Video to Posh (#213) (`$posh.Video`)

---

## Posh 0.1.4: Some Posh News

* Added .News to every module (#173)
Expand Down
1 change: 1 addition & 0 deletions Formatting/Reflection/TypeEventControl.format.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Write-FormatViewExpression -If { $_.EventHandlerType.GetMethod('Invoke') } -ScriptBlock {
$MethodParameters = @($_.EventHandlerType.GetMethod('Invoke').GetParameters())
foreach ($n in 0..($MethodParameters.Count - 1)) {
if (-not $MethodParameters[$n]) { continue }
$o =[PSObject]::new($MethodParameters[$n])
$o.psobject.properties.add([PSNoteProperty]::new('N', $N))
$o
Expand Down
1 change: 1 addition & 0 deletions Formatting/Reflection/TypeMethodControl.format.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
Write-FormatViewExpression -ScriptBlock {
$MethodParameters = @($_.GetParameters())
foreach ($n in 0..($MethodParameters.Count - 1)) {
if (-not $MethodParameters[$n]) { continue }
$o =[PSObject]::new($MethodParameters[$n])
$o.psobject.properties.add([PSNoteProperty]::new('N', $N))
$o
Expand Down
2 changes: 2 additions & 0 deletions Posh.format.ps1xml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ $script:TreeDepth++;</ScriptBlock>
<ScriptBlock>
$MethodParameters = @($_.EventHandlerType.GetMethod('Invoke').GetParameters())
foreach ($n in 0..($MethodParameters.Count - 1)) {
if (-not $MethodParameters[$n]) { continue }
$o =[PSObject]::new($MethodParameters[$n])
$o.psobject.properties.add([PSNoteProperty]::new('N', $N))
$o
Expand Down Expand Up @@ -505,6 +506,7 @@ $script:TreeDepth++;</ScriptBlock>
<ScriptBlock>
$MethodParameters = @($_.GetParameters())
foreach ($n in 0..($MethodParameters.Count - 1)) {
if (-not $MethodParameters[$n]) { continue }
$o =[PSObject]::new($MethodParameters[$n])
$o.psobject.properties.add([PSNoteProperty]::new('N', $N))
$o
Expand Down
127 changes: 19 additions & 108 deletions Posh.psd1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@{
ModuleVersion = '0.1.4'
ModuleVersion = '0.1.5'
FormatsToProcess = 'Posh.format.ps1xml'
TypesToProcess = 'Posh.types.ps1xml'
RootModule = 'Posh.psm1'
Expand All @@ -15,6 +15,16 @@
IconURI = 'https://raw.githubusercontent.com/StartAutomating/Posh/main/Assets/Posh.png'
Tags = 'Posh', '.ps1xml', 'Format','Output','Types', 'Colorized', 'Prompt', 'Customization'
ReleaseNotes = @'
## Posh 0.1.5: Posh Issues and Discussions
* Adding PSModuleInfo.Discussion (Fixes #212)
* Adding PSModuleInfo.Issue (Fixes #137)
* Improving Issue Templates
* Adding Stefan Stanger's Blog to $Posh.News (#209) (thanks @stefanstranger)
* Adding RTPSUG Video to Posh (#213) (`$posh.Video`)
---
## Posh 0.1.4: Some Posh News
* Added .News to every module (#173)
Expand All @@ -26,111 +36,7 @@ Also, added tests (#204).
---
## Posh 0.1.3: Posh Tips and Tricks
* New Formatting:
* Adding Select-XML Formatter (#107)
* Posh.Preset.Collection (#153)
* Posh.Tip.Command (#166)
* Updated Formatting:
* Making DirectoryIcon customizable / changing default to triangle (#169)
* Integrating Tips/Links into Posh Formatting (#165)
* Improving Formatting of Select-String (#109) (thanks @mdgrs-mei ! )
* Added Tips and Tricks to Modules (#118) and added the first round of tips/tricks:
* NegativeIndexingFibonacci Trick (#168)
* GenericTypes Tip (#167)
* Ordered Hashtables Tip (#156)
* Hashtables Tip (#155)
* AssigningLoopOutput Tip (#145)
* RangeOperator Tip (#151)
* NegativeIndex Tip (#150)
* TernaryOperator Tip (#148)
* Creating PsuedoObjects Trick (#144)
* AssigningIfStatements Tip (#144)
* Tip - Trinity of Discoverability (#142)
* Tip - You Can Get Help On a Script (#147)
* Tip - Everything Is An Object (#140)
* Trick - The Parameter Set That Was Not There (#141)
* Multiple Assignment Tip (#143)
* LoopLabels Tip (#146)
* see issues #166
* New Extended Types:
* Posh.Preset.Collection (#153)
* Posh.Preset.Command (#154)
* Posh.ExtensionCollection
* .Count (#162)
* .Refresh() (#123)
* .Random (#124)
* .All (#128)
* get/set .CommandType (#127)
* get/set .Path (#126)
* get/set Module (#125)
* Updated Extended Types
* PSModuleInfo.Link (#64/#157/#158/#159/#160)
* PSModuleInfo.Preset (#64/#153)
* PSModuleInfo.Tip(s)/Trick(s) (#119, #120)
* $Posh.Host.get/set_Title (#130)
* Fixing stackable functions (#110, thanks @mdgrs-mei !)
* Updating Posh.Preset.Command.Use help (#154)
* Adding FileIcons Preset (#163)
* Making TabExpansion Stackable (#116)
---
## Posh 0.1.2:
* New Demos
* Posh.demo.ps1 (#95)
* Posh.Prompt.demo.ps1 (#96)
* Posh Profile Customization (#97)
* New formatters:
* Adding Formatting for Match (#100)
* Adding Variable Formatting (#102)
* Extending Modules
* Adding PSModuleInfo.Test(s) (#104)
* Prompt Customization:
* Posh.Prompt.Undo() (#103)
* Profile Customization:
* Posh.Profiles.RemoveModule (#105)
* Posh.Profiles.New() (#101)
* Posh.Profile.ImportModule (#93)
* Posh.Profile.Matches (#99)
* Posh.Profile.Replace (#92)
* Posh.Profile.get_File (#76)
---
## Posh 0.1.1:
* Posh can be sponsored (please show your support) (#77)
* Added $Posh.Recommends (#65)
* Added LinkedIn to $Posh.Resources (#66)
* Added Logo (#67)
* Expanding $Posh.Parameters (#68)
* Adding LocalTime to TimeZone formatting (#84, #85)
* $LastOutput/$LastOutputError (#74)
* Adding $profile.Directory (#75)
* Expanding PSModuleInfo
* Recommendations (#65)
* Screenshots (#79)
* Videos (#80)
* Demos (#81)
* Logo (#89)
---
## Posh 0.1:
* Initial Version of Posh, including:
* Customizable prompts
* Easier access to PowerShell Error history
* Formatting:
* Reflection formatter
* Get-Member in Color
* Colorized XML
* Colorized File View (with Icons!) (no NerdFonts required)
* Colorized Regex
* Process HeatMap
More History in [CHANGELOG](CHANGELOG.md)
'@
}
FileTypes = @{
Expand Down Expand Up @@ -168,6 +74,10 @@ Also, added tests (#204).
'PowerShell LinkedIn' = 'https://www.linkedin.com/feed/hashtag/?keywords=powershell'
}

Video = @{
"Improving the Shell Experience (from RTPSUG)" = "https://www.youtube.com/watch?v=iZgcTD_uN-w"
}

News =
@{"PowerShell Blog" = "https://devblogs.microsoft.com/powershell/feed/"},
@{"Evotec"="https://evotec.xyz/feed/"},
Expand All @@ -180,9 +90,10 @@ Also, added tests (#204).
@{"The Lonely Administrator" = "https://jdhitsolutions.com/blog/feed/"},
@{"MDGRS Factory"="https://mdgrs.hashnode.dev/rss.xml"},
@{"Pipe How"="https://pipe.how/index.xml"},
@{"PowerShell is Fun"="https://powershellisfun.com/feed/"}
@{"PowerShell is Fun"="https://powershellisfun.com/feed/"},
@{"Stefan Stranger"="https://stefanstranger.github.io/feed"}

# Got more News? Feel free to file and issue and open a PR to add your feed.
# Got more News? Feel free to file an issue and open a PR to add your feed.

# Any module can contain it's own .News.
# If Posh and that module are loaded, your module will have .News/.Feed/.RSS properties.
Expand Down
48 changes: 48 additions & 0 deletions Posh.types.ps1xml
Original file line number Diff line number Diff line change
Expand Up @@ -2745,10 +2745,18 @@ $posh.ExecutionContext.SessionState.PSVariable.Set("function:$($this.FunctionNam
<Name>Demos</Name>
<ReferencedMemberName>Demo</ReferencedMemberName>
</AliasProperty>
<AliasProperty>
<Name>Discussions</Name>
<ReferencedMemberName>Discussion</ReferencedMemberName>
</AliasProperty>
<AliasProperty>
<Name>Feed</Name>
<ReferencedMemberName>News</ReferencedMemberName>
</AliasProperty>
<AliasProperty>
<Name>Issues</Name>
<ReferencedMemberName>Issue</ReferencedMemberName>
</AliasProperty>
<AliasProperty>
<Name>Links</Name>
<ReferencedMemberName>Link</ReferencedMemberName>
Expand Down Expand Up @@ -2879,6 +2887,46 @@ $this |
Select-Object -Unique
</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>Discussion</Name>
<GetScriptBlock>
&lt;#
.SYNOPSIS
Gets a module's discussions URL.
.DESCRIPTION
Gets the discussions URL related to a module.
.NOTES
The Module must set it's ProjectURI, and it must be on GitHub, or this will return nothing.
#&gt;
if ($this.ProjectURI.Host -eq 'github.com') {
[PSCustomObject][Ordered]@{
Name = "$($this.Name) Discussions"
Url = "$($this.ProjectURI)/discussions"
PSTypeName = 'Posh.Module.Link'
}
}
</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>Issue</Name>
<GetScriptBlock>
&lt;#
.SYNOPSIS
Gets a module's issue URL.
.DESCRIPTION
Gets the issues URL related to a module.
.NOTES
The Module must set it's ProjectURI, and it must be on GitHub, or this will return nothing.
#&gt;
if ($this.ProjectURI.Host -eq 'github.com') {
[PSCustomObject][Ordered]@{
Name = "$($this.Name) Issues"
Url = "$($this.ProjectURI)/issues"
PSTypeName = 'Posh.Module.Link'
}
}
</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>Link</Name>
<GetScriptBlock>
Expand Down
2 changes: 2 additions & 0 deletions Types/PSModuleInfo/Alias.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@
Presets = 'Preset'
RSS = 'News'
Feed = 'News'
Discussions = 'Discussion'
Issues = 'Issue'
}
15 changes: 15 additions & 0 deletions Types/PSModuleInfo/get_Discussion.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<#
.SYNOPSIS
Gets a module's discussions URL.
.DESCRIPTION
Gets the discussions URL related to a module.
.NOTES
The Module must set it's ProjectURI, and it must be on GitHub, or this will return nothing.
#>
if ($this.ProjectURI.Host -eq 'github.com') {
[PSCustomObject][Ordered]@{
Name = "$($this.Name) Discussions"
Url = "$($this.ProjectURI)/discussions"
PSTypeName = 'Posh.Module.Link'
}
}
15 changes: 15 additions & 0 deletions Types/PSModuleInfo/get_Issue.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<#
.SYNOPSIS
Gets a module's issue URL.
.DESCRIPTION
Gets the issues URL related to a module.
.NOTES
The Module must set it's ProjectURI, and it must be on GitHub, or this will return nothing.
#>
if ($this.ProjectURI.Host -eq 'github.com') {
[PSCustomObject][Ordered]@{
Name = "$($this.Name) Issues"
Url = "$($this.ProjectURI)/issues"
PSTypeName = 'Posh.Module.Link'
}
}
10 changes: 10 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## Posh 0.1.5: Posh Issues and Discussions

* Adding PSModuleInfo.Discussion (Fixes #212)
* Adding PSModuleInfo.Issue (Fixes #137)
* Improving Issue Templates
* Adding Stefan Stanger's Blog to $Posh.News (#209) (thanks @stefanstranger !)
* Adding RTPSUG Video to Posh (#213) (`$posh.Video`)

---

## Posh 0.1.4: Some Posh News

* Added .News to every module (#173)
Expand Down
29 changes: 29 additions & 0 deletions docs/System.Management.Automation.PSModuleInfo.get_Discussion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
System.Management.Automation.PSModuleInfo.get_Discussion()
----------------------------------------------------------




### Synopsis
Gets a module's discussions URL.



---


### Description

Gets the discussions URL related to a module.



---


### Notes
The Module must set it's ProjectURI, and it must be on GitHub, or this will return nothing.



---
29 changes: 29 additions & 0 deletions docs/System.Management.Automation.PSModuleInfo.get_Issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
System.Management.Automation.PSModuleInfo.get_Issue()
-----------------------------------------------------




### Synopsis
Gets a module's issue URL.



---


### Description

Gets the issues URL related to a module.



---


### Notes
The Module must set it's ProjectURI, and it must be on GitHub, or this will return nothing.



---

0 comments on commit 4958c67

Please sign in to comment.