Skip to content

Commit 61915a1

Browse files
committed
Updated the dokumentation.
1 parent 9ce0c68 commit 61915a1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Docs/Design_command.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,13 @@ public class ConvertCommand(string identifier, PowerCommandsConfiguration config
143143
![Alt text](images/convert_sample.png?raw=true "Describe convert command")
144144

145145
### User wants to write the converted output to file
146-
You could add this to the ConvertCommand class but... you do not have to do that, PowerCommands support to call a second command on the same commandline and that second command can handle the output from the "calling" command, so if you want the output that is displayed in the console by the ConvertCommand to be written to file you could write this in the console and use the existing `file` command, you need to specify a target file to the `file` command with the option flag `--target` like this:
146+
You could add this to the ConvertCommand class but you do not have to do that, PowerCommands support to call a second command on the same commandline and that second command can handle the output from the "calling" command, so if you want the output that is displayed in the console by the ConvertCommand to be written to file you could write this in the console and use the existing `file` command, you need to specify a target file to the `file` command with the option flag `--target` like this:
147147

148148
```convert PowerCommandsConfiguration.yaml --format json | file --target "PowerCommandsConfiguration.json"```
149149

150150
This will write a file named **PowerCommandsConfiguration.json** in the current working directory.
151151

152+
If you want to design a Command that wants to process output from a calling command, you can use the | functionality, read more about [Chain command execution](ChainCommands.md).
152153

153154
## Must I use the PowerCommandDesign attribute on every command I create?
154155
No that is not mandatory but it is recommended, note that when you declare the [Options](Options.md), they will be available for code completion, which means that when the consumer types - and hit the tab button the user will can se what options there are that could be used, with a simple ! character you tell that the argument, quote, option or secret is required and then the Core runtime will validate that automatically for you.
@@ -160,7 +161,7 @@ Next step is to understand the [Power Commands Design attribute](PowerCommandDes
160161

161162
Read more about:
162163

163-
[Chain command execution)](ChainCommands.md)
164+
[Chain command execution](ChainCommands.md)
164165

165166
[Read and write files with FileCommand](ReadWriteFileHandler.md)
166167

Docs/ReadWriteFileHandler.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Read more about:
108108

109109
[Configuration (see example on how you can add your bookmarks)](Configuration.md)
110110

111-
[Chain command execution)](ChainCommands.md)
111+
[Chain command execution](ChainCommands.md)
112112

113113
[Input](Input.md)
114114

0 commit comments

Comments
 (0)