Skip to content

Commit

Permalink
Merge pull request #7 from JohnRoos/help
Browse files Browse the repository at this point in the history
Added help
  • Loading branch information
JohnRoos authored Nov 10, 2020
2 parents e045d76 + 806c507 commit 4b79232
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Public/Get-VarStash.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
<#
.SYNOPSIS
Gets one or more variable stashes.
.DESCRIPTION
Gets one or more variable stashes. Returns the name and the created date for each stash.
.EXAMPLE
Get-VarStash
Gets all available variable stashes.
.EXAMPLE
Get-VarStash -Name MyStash
Gets the variable stash called MyStash.
.EXAMPLE
Get-VarStash -Name My*
Gets variable stashes with names starting with 'My'.
.EXAMPLE
Get-VarStash -Index 2
Gets the variable stash on index position 2 in the stash. Index starts with 0.
#>
function Get-VarStash {
[CmdletBinding(DefaultParameterSetName = '__AllParameterSets')]
param(
Expand Down
11 changes: 11 additions & 0 deletions Public/Get-VarStashBlackList.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
<#
.SYNOPSIS
Gets the variable stash black list.
.DESCRIPTION
Gets the variable stash black list. The black list contains variable names which will be ignored when pushing to variable stash.
These names are standard variables which are not user created.
.EXAMPLE
Get-VarStashBlackList
Gets the variable stash black list.
#>
function Get-VarStashBlackList {
[CmdletBinding()]
param()
Expand Down
24 changes: 24 additions & 0 deletions Public/Pop-VarStash.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
<#
.SYNOPSIS
Pops a variable stash.
.DESCRIPTION
Pops a variable stash. This command restores all variables from a variable stash and then removes the stash from storage. The stash can optionally be kept using the -Keep parameter.
.EXAMPLE
Pop-VarStash
Pops the variables from the top of the stash (latest stash, index 0).
.EXAMPLE
Pop-VarStash -Name MyStash
Pops the variables from the stash with name 'MyStash'.
.EXAMPLE
Pop-VarStash -Index 2
Pops the variables from the stash with index position 2 (lates stash has index 0).
.EXAMPLE
Pop-VarStash -Keep
Pops the variables from the top of the stash (latest stash, index 0). When using parameter -Keep, the stash will not be removed from storage (and the verb pop does not make any sense :) ).
#>
function Pop-VarStash {
[CmdletBinding(DefaultParameterSetName = 'Keep')]
param(
Expand Down
13 changes: 13 additions & 0 deletions Public/Push-VarStash.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
<#
.SYNOPSIS
Pushes variables to the variable stash.
.DESCRIPTION
Pushes variables to the variable stash. The pushed variables will be stored on the top of the stash (index 0).
.EXAMPLE
Push-VariableStash
Pushes variables to the variable stash. Since the -Name parameter is omitted, a default name will be set (a guid).
.EXAMPLE
Push-VariableStash -Name MyStash
Pushes variables to the variable stash with name MyStash.
#>
function Push-VarStash {
[CmdletBinding()]
param (
Expand Down
18 changes: 18 additions & 0 deletions Public/Remove-VarStash.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
<#
.SYNOPSIS
Removes a variable stash.
.DESCRIPTION
Permanently removes a variable stash.
.EXAMPLE
Remove-VarStash -Name MyStash
Removes the stash named MyStash.
.EXAMPLE
Remove-VarStash -Index 2
Removes the stash with index position 2 (lates stash has index 0).
.EXAMPLE
Remove-VarStash -Index 2 -WhatIf
Shows what would have happened if this command would run without the -WhatIf parameter.
#>
function Remove-VarStash {
[CmdletBinding(DefaultParameterSetName = 'Name')]
param(
Expand Down
18 changes: 18 additions & 0 deletions Public/Show-VarStash.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
<#
.SYNOPSIS
Shows the content of a variable stash.
.DESCRIPTION
Shows the content of a variable stash. Returns objects of type PSVariable.
.EXAMPLE
Show-VarStash
Shows the content of the latest stash (from top of stash, index 0)
.EXAMPLE
Show-VarStash -Name MyStash
Shows the content of the stash named MyStash.
.EXAMPLE
Show-VarStash -Index 2
Shows the content of the stash with index position 2 (lates stash has index 0).
#>
function Show-VarStash {
[CmdletBinding(DefaultParameterSetName = '__AllParameterSets')]
param(
Expand Down

0 comments on commit 4b79232

Please sign in to comment.