claptrap 0.3.0

Bring the power of Clap to shell scripts.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env pwsh

$ErrorActionPreference = 'Stop'
Set-StrictMode -Version Latest

$spec = @'
name = "myapp"
[args]
# this wil cause clap to panic
mode = { index = 2 }
'@
. ([scriptblock]::Create(( $spec | & $env:CLAPTRAP_BIN --spec - --output-format powershell -- @args ) -join "`n"))