~kaction/config

627f3b188e76d83ce38f35fa91556bb0a366d500 — Dmitry Bogatov 2 months ago 83c87e6
universe/selectors: add selector for git branch
1 files changed, 6 insertions(+), 0 deletions(-)

M universe/selectors/default.nix
M universe/selectors/default.nix => universe/selectors/default.nix +6 -0
@@ 22,9 22,15 @@ let
    pipeline { ${git}/bin/git ls-files $@ }
    ${fzy}/bin/fzy
  '';
  branch = writeScript "branch-selector" ''
    #!${execline}/bin/execlineb -WS0
    pipeline { git for-each-ref refs/heads/ --format=%(refname:short) }
    ${fzy}/bin/fzy
  '';
in runCommandLocal "selectors" { } ''
  mkdir -p $out/bin
  ln -sf ${bug} $out/bin/fzy-bug
  ln -sf ${commit} $out/bin/fzy-commit
  ln -sf ${file} $out/bin/fzy-file
  ln -sf ${branch} $out/bin/fzy-branch
''