This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function k8s() { | |
$Cache = @{Names=@{}} | |
function makectx { | |
@{ | |
Namespace = "default" | |
Ctx = $(kubectl config current-context) | |
Current = @{Name = $null; TypeAlias=$null} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
// helper function to set the console collor and automatically set it back when disposed | |
let consoleColor (fc : ConsoleColor) = | |
let current = Console.ForegroundColor | |
Console.ForegroundColor <- fc | |
{ new IDisposable with | |
member x.Dispose() = Console.ForegroundColor <- current } | |
// printf statements that allow user to specify output color |