Skip to content

Commit

Permalink
feat(git): add the brancherer - a small interactive git branch selector
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenhoenle committed Jul 9, 2024
1 parent f564f2b commit e332a8a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion home/git.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{ osConfig, ... }:
{ pkgs, osConfig, ... }:
let
cfg = osConfig.ruben.git;
brancherer = pkgs.writeShellApplication {
name = "branch";
runtimeInputs = [ pkgs.openssh ];
text = ''
${pkgs.git}/bin/git branch | grep -v "^\*" | ${pkgs.fzf}/bin/fzf --height=20% --reverse --info=inline | xargs ${pkgs.git}/bin/git checkout
'';
};
in
{
config = {
Expand All @@ -20,5 +27,7 @@ in
};
};
};

home.packages = [ brancherer ];
};
}

0 comments on commit e332a8a

Please sign in to comment.