Owl.cli
0.0.1
See the version list below for details.
dotnet add package Owl.cli --version 0.0.1
NuGet\Install-Package Owl.cli -Version 0.0.1
<PackageReference Include="Owl.cli" Version="0.0.1" />
paket add Owl.cli --version 0.0.1
#r "nuget: Owl.cli, 0.0.1"
// Install Owl.cli as a Cake Addin #addin nuget:?package=Owl.cli&version=0.0.1 // Install Owl.cli as a Cake Tool #tool nuget:?package=Owl.cli&version=0.0.1
🔷 Owl.cli
Owl.cli is a library to facilitate the use of shell from F#.
🔹 Usage
1️⃣ cmd computation expression
▫️ exec
custom op : string → string
Execute the command passed to exec
and receive the result.
Use into
to receive the results.
open Owl.cli.cmd
use c = cmd () {
exec @"dir C:\" into r
printfn $"%s{r}"
}
▫️ exit
custom op : unit → ShellBuilder
Explicitly terminates the cmd.
If exit
is not called, the cmd also exits when the ShellBuilder is disposed.
open Owl.cli.cmd
use c = cmd () {
exec @"dir C:\"
exit
}
▫️ results
property : array<Output>
Obtain a pair of executed commands and their results.
open Owl.cli.cmd
use c = cmd () {
exec @"dir C:\"
exit
}
c.results |> Array.iter (printfn "%A")
2️⃣ powershell computation expression
▫️ exec
custom op : string → string
Execute the command passed to exec
and receive the result.
Use into
to receive the results.
open Owl.cli.powershell
use p = powershell () {
exec @"ls C:\" into r
printfn $"%s{r}"
}
▫️ exit
custom op : unit → ShellBuilder
Explicitly terminates the powershell.
If exit
is not called, the powershell also exits when the ShellBuilder is disposed.
open Owl.cli.powershell
use p = powershell () {
exec @"ls C:\"
exit
}
▫️ results
property : array<Output>
Obtain a pair of executed commands and their results.
open Owl.cli.powershell
use p = powershell () {
exec @"ls C:\"
exit
}
p.results |> Array.iter (printfn "%A")
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- FSharp.Core (>= 7.0.200)
- System.Diagnostics.Process (>= 4.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.