Koshu plugin for simplifying user interactions in your psake scripts
This plugin currently does not support configuration.
config @{
"Koshu.Interactive"=@{}
}
Read-Option `
-message <Message> `
-options <OptionsArray> `
-separator [<Separator>] ` # Optional. Defaults to `r`n
-optionFormat [<Format>] ` # Optional. Defaults to {index}. {option}
-promptFormat [<Format>] ` # Optional. Defaults to {message}`r`n{options}
-abortable ` # Optional switch for adding an 'abort' option
-onAbort [<ScriptBlock>] ` # Optional script block to execute if the abort option is specified
-force # Optional switch for triggering a prompt even when InteractiveMode is set to $False
Read-Switch `
-message <Message> `
-force # Optional switch for triggering a prompt even when InteractiveMode is set to $False
Execute-Interactive `
-message <Message> `
-action <ScriptBlock> # Script block to execute if the user replies 'yes' to the prompt
Set-Interactive `
-interactive <Bool>
Sets the InteractiveMode variable to the $True or $False
Get-Interactive
Returns the value of the InteractiveMode variable. If the variable hasn't been set, the user will be prompted to set it.
InteractiveMode-Set
Returns $True if the InteractiveMode variable has been and $False if it hasn't been set.
You can browse through the sample koshufile.ps1
in the examples directory if you need help getting started.
MIT (http://opensource.org/licenses/mit-license.php)
Kristoffer Ahl (project founder) Email: [email protected] Twitter: http://twitter.com/kristofferahl Website: http://www.77dynamite.com/