File tree 1 file changed +67
-1
lines changed
1 file changed +67
-1
lines changed Original file line number Diff line number Diff line change 1
1
# VariableStash
2
2
[ ![ PowerShell Gallery Version] ( https://img.shields.io/powershellgallery/v/VariableStash )] ( https://www.powershellgallery.com/packages/VariableStash )
3
3
4
- Like git stash but for variables, kinda
4
+ Like git stash but for variables, kinda.
5
5
6
+ ## Examples
7
+
8
+ Stash your current variables on the top of the stash:
9
+
10
+ ``` powershell
11
+ Push-VarStash
12
+ ```
13
+
14
+ Restore variables in your current session from top of stash:
15
+
16
+ ``` powershell
17
+ Pop-VarStash
18
+ ```
19
+
20
+ Name your stash
21
+
22
+ ``` powershell
23
+ Push-VarStash -Name 'MyStash'
24
+ ```
25
+
26
+ List available stashes:
27
+
28
+ ``` powershell
29
+ Get-VarStash
30
+
31
+ <#
32
+ Date Name
33
+ ---- ----
34
+ 2020-11-09 12:39:39 PM bddec36d-6335-45e6-b2bf-d2f5cff3a567
35
+ 2020-11-09 12:30:23 PM MyStash
36
+ 2020-11-09 12:27:24 PM 1b53d3fa-5e42-4510-b72b-2ba3e748b534
37
+ #>
38
+ ```
39
+
40
+ Pop the named stash:
41
+
42
+ ``` powershell
43
+ Pop-VarStash -Name 'MyStash'
44
+ ```
45
+
46
+ Or Pop using index:
47
+
48
+ ``` powershell
49
+ Pop-VarStash -Index 1
50
+ ```
51
+
52
+ Want to keep the stash after you pop it? Here's how:
53
+
54
+ ``` powershell
55
+ Pop-VarStash -Index 1 -Keep
56
+ ```
57
+
58
+ Peek inside and show the variables inside a stash:
59
+
60
+ ``` powershell
61
+ Show-VarStash -Name MyStash
62
+
63
+ <#
64
+ Name Value
65
+ ---- -----
66
+ MyInt 40
67
+ mystring This is a string
68
+ #>
69
+ ```
70
+
71
+ More examples will come.
You can’t perform that action at this time.
0 commit comments