bin/kctx.nix (view raw)
1 2 3 4 5 6 7 8 9 10 11 12
{ pkgs, ... }: let name = "kctx"; kubectx = "${pkgs.kubectx}/bin/kubectx"; fzy = "${pkgs.fzy}/bin/fzy"; in pkgs.writeShellScriptBin name '' ctx="$(${kubectx} | ${fzy})" ${kubectx} "$ctx" ''