Skip to content

Commit

Permalink
v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhitsolutions committed Mar 15, 2022
1 parent 10dfe23 commit 573c1df
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 12 deletions.
6 changes: 6 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# ChangeLog for PSFunctionInfo

## 1.1.0

+ Fixed DefaultDisplayPropertySet in types.ps1xml file.
+ Added online help links.
+ Updated `README`.

## 1.0.0

+ Restructured module layout.
Expand Down
Binary file modified License.txt
Binary file not shown.
Binary file modified PSFunctionInfo.psd1
Binary file not shown.
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ Finally, you can also search .ps1 files for PSFunctionInfo metadata.
Use the [New-PSFunctionInfo](docs/New-PSFunctionInfo.md) command to insert the metadata tag into your script file.

```powershell
New-PSFunctionInfo -Path c:\scripts\Test-ConsoleColors.ps1 -Description "show console color combinations" -Name Test-ConsoleColor -Author "Jeff Hicks" -CompanyName "JDH IT Solutions" -Copyright "2021 JDH IT Solutions, Inc." -Tags "scripting","console"
New-PSFunctionInfo -Path c:\scripts\Test-ConsoleColors.ps1 -Description "show console color combinations" -Name Test-ConsoleColor -Author "Jeff Hicks" -CompanyName "JDH IT Solutions" -Copyright "2022 JDH IT Solutions, Inc." -Tags "scripting","console"
```

The default behavior is to insert the metadata tag immediately after the opening brace (`{`) into the file. **This command will update the file**. Or you can use the `ToClipBoard` parameter which will copy the metatadata to the clipboard. You can then manually insert it into your script file that defines the function. You should avoid changing the formatting of the comment block.
The default behavior is to insert the metadata tag immediately after the opening brace (`{`) into the file. __This command will update the file__. Or you can use the `ToClipBoard` parameter which will copy the metatadata to the clipboard. You can then manually insert it into your script file that defines the function. You should avoid changing the formatting of the comment block.

You should get something like this:

Expand All @@ -78,17 +78,17 @@ You should get something like this:
Version 1.0.0
Author Jeff Hicks
CompanyName JDH IT Solutions
Copyright 2021 JDH IT Solutions, Inc.
Copyright 2022 JDH IT Solutions, Inc.
Description show console color combinations
Guid 8e43a9d9-1df6-48c7-8595-7363087aba43
Tags scripting,console
LastUpdate 4/21/2021 10:43 AM
LastUpdate 2/22/2022 10:43 AM
Source C:\scripts\Test-ConsoleColors.ps1
#>
```

This command **not work** with functions defined in a single line like:
This command __not work__ with functions defined in a single line like:

```powershell
Function Get-Foo { Get-Date }
Expand All @@ -104,11 +104,11 @@ Function Get-Foo {
Version 1.0.0
Author Jeff Hicks
CompanyName JDH IT Solutions
Copyright 2021 JDH IT Solutions, Inc.
Copyright 2022 JDH IT Solutions, Inc.
Description Get Foo Stuff
Guid 490595c6-6a0c-4572-baf4-f808c010de70
Tags scripting,console
LastUpdate 4/21/2021 10:4f AM
LastUpdate 2/21/2022 10:41 AM
Source C:\scripts\FooStuff.ps1
#>
Expand Down Expand Up @@ -191,5 +191,3 @@ This module was first described at <https://jdhitsolutions.com/blog/powershell/8
+ Add function metadata by file, autodetecting the function name.
+ Consider a bulk editing command.
+ Consider a bulk removal command to clean PSFunctionInfo metadata from files.

Last Updated 2021-05-03 10:10:39Z
4 changes: 2 additions & 2 deletions docs/Edit-PSFunctionInfo.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
external help file: PSFunctionInfo-help.xml
Module Name: PSFunctionInfo
online version:
online version: https://bit.ly/3w8SBFj
schema: 2.0.0
---

Expand Down Expand Up @@ -135,4 +135,4 @@ Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell
[Get-PSFunctionInfo](Get-PSFunctionInfo.md)
[New-PSFunctionInfo](New-PSFunctionInfo.md)
[New-PSFunctionInfo](New-PSFunctionInfo.md)
1 change: 1 addition & 0 deletions docs/about_PSFunctionInfo.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# PSFunctionInfo

## about_PSFunctionInfo

# SHORT DESCRIPTION
Expand Down
4 changes: 4 additions & 0 deletions en-us/PSFunctionInfo-help.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@
</command:example>
</command:examples>
<command:relatedLinks>
<maml:navigationLink>
<maml:linkText>Online Version:</maml:linkText>
<maml:uri>https://bit.ly/3w8SBFj</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Get-PSFunctionInfo</maml:linkText>
<maml:uri></maml:uri>
Expand Down
7 changes: 6 additions & 1 deletion types/psfunctioninfo.types.ps1xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<Name>LastUpdate</Name>
</ReferencedProperties>
</PropertySet>
<PropertySet>
<PropertySet>
<Name>TagInfo</Name>
<ReferencedProperties>
<Name>Name</Name>
Expand All @@ -24,6 +24,9 @@
<Name>Source</Name>
</ReferencedProperties>
</PropertySet>
<MemberSet>
<Name>PSStandardMembers</Name>
<Members>
<PropertySet>
<!-- This matches the defaults for Get-Command-->
<Name>DefaultDisplayPropertySet</Name>
Expand All @@ -34,6 +37,8 @@
<Name>Module</Name>
</ReferencedProperties>
</PropertySet>
</Members>
</MemberSet>
<AliasProperty>
<Name>Path</Name>
<ReferencedMemberName>Source</ReferencedMemberName>
Expand Down

0 comments on commit 573c1df

Please sign in to comment.