Skip to content

Commit 9c51e14

Browse files
committed
refactoring
1 parent e195a7a commit 9c51e14

File tree

8 files changed

+48
-3
lines changed

8 files changed

+48
-3
lines changed

Templates/PowerCommands_devops.zip

296 KB
Binary file not shown.

Templates/README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
Download the Visual Studio Template zipfile from [here](PowerCommands.zip)
1+
# Templates
2+
3+
## Standard template
4+
5+
[PowerCommands.zip](PowerCommands.zip)
26

37
Copy the .zip file into the user project template directory. By default, this directory is **%USERPROFILE%\Documents\Visual Studio <version>\Templates\ProjectTemplates** (do not place it in any of the subfolders).
48

5-
Open Visual Studio and write Power in the searchbox, you should find the PowerCommand template.
9+
Open Visual Studio and write Power in the searchbox, you should find the PowerCommand template.
10+
11+
## DevOps template
12+
This one [PowerCommands_DevOps.zip](PowerCommands_devops.zip) has a couple of commands that lets you run kubectl, docker and powershell commands just as you would do from a standard **cmdprompt**.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using PainKiller.PowerCommands.Core.Commands;
2+
3+
namespace $safeprojectname$.Commands;
4+
5+
[PowerCommandDesign( description: "Run docker commands",
6+
overrideHelpOption: true,
7+
example: "docker run -p 9000:9000 -p 9001:9001 minio/minio server /data --console-address \":9001\"")]
8+
public class DockerCommand : MasterCommando
9+
{
10+
public DockerCommand(string identifier, PowerCommandsConfiguration configuration) : base(identifier, configuration) { }
11+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using PainKiller.PowerCommands.Core.Commands;
2+
3+
namespace $safeprojectname$.Commands;
4+
5+
[PowerCommandTest( tests: " ")]
6+
[PowerCommandDesign( description: "Run kubectl commands using the alias k",
7+
overrideHelpOption: true,
8+
example: "k")]
9+
public class KCommand : MasterCommando
10+
{
11+
public KCommand(string identifier, PowerCommandsConfiguration configuration) : base(identifier, configuration, alias: "kubectl") { }
12+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using PainKiller.PowerCommands.Core.Commands;
2+
3+
namespace $safeprojectname$.Commands;
4+
5+
[PowerCommandTest( tests: " ")]
6+
[PowerCommandDesign( description: "Run powershell commands",
7+
options: "Get-Help|Get-Command|Get-Process|Get-Service|filter",
8+
example: "//Get all available powershell commands on your machine.|ps Get-Command")]
9+
10+
public class PsCommand : MasterCommando
11+
{
12+
public PsCommand(string identifier, PowerCommandsConfiguration configuration) : base(identifier, configuration, alias: "powershell") { }
13+
}

src/PainKiller.PowerCommands/PainKiller.PowerCommands.MyExampleCommands/Commands/PsCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace PainKiller.PowerCommands.MyExampleCommands.Commands;
44

55
[PowerCommandTest( tests: " ")]
6-
[PowerCommandDesign( description: "Run powershell commands, with possibility to filter the output. You don´t have to use the options, you could just write your powershell commands as is.",
6+
[PowerCommandDesign( description: "Run powershell commands",
77
options: "Get-Help|Get-Command|Get-Process|Get-Service|filter",
88
example: "//Get all available powershell commands on your machine.|ps Get-Command")]
99

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
2+
<s:Boolean x:Key="/Default/UserDictionary/Words/=powershell/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

0 commit comments

Comments
 (0)