all repos — dotfiles @ 4cf9dfb08e52633880b6567077442df1244c5d81

my *nix dotfiles

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"
  ''