pkgs: git-fixup
This commit is contained in:
parent
6367408497
commit
d56d339de7
3 changed files with 13 additions and 1 deletions
|
@ -47,6 +47,7 @@
|
|||
helix
|
||||
fish
|
||||
git-commit-last
|
||||
git-fixup
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
perSystem =
|
||||
{ pkgs, inputs', ... }:
|
||||
{ pkgs, lib, inputs', ... }:
|
||||
{
|
||||
packages.conduit-next = pkgs.callPackage ./conduit {
|
||||
src = inputs.conduit-src;
|
||||
|
@ -16,5 +16,15 @@
|
|||
git commit -eF "$GITDIR/COMMIT_EDITMSG"
|
||||
'';
|
||||
};
|
||||
|
||||
packages.git-fixup = pkgs.writeShellApplication {
|
||||
name = "git-fixup";
|
||||
text = ''
|
||||
git log -n 50 --pretty=format:'%h %s' --no-merges | \
|
||||
${lib.getExe pkgs.fzf} | \
|
||||
cut -c -7 | \
|
||||
xargs -o git commit --fixup
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ and begin
|
|||
abbr --add --global -- gd 'git diff'
|
||||
abbr --add --global -- gdd 'git diff --cached'
|
||||
abbr --add --global -- gl 'git log'
|
||||
abbr --add --global -- gf 'git fixup' # See pkgs/default.nix
|
||||
|
||||
# Aliases
|
||||
alias cat bat
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue