shells: silverfin: add command to delete merged branches

This commit is contained in:
Charlotte Van Petegem 2024-07-16 15:27:51 +02:00
parent faa6d9b0ea
commit 8afb92dee5

View file

@ -7,6 +7,17 @@ pkgs.devshell.mkShell {
ln -snf $DEVSHELL_DIR $PRJ_DATA_DIR/devshell ln -snf $DEVSHELL_DIR $PRJ_DATA_DIR/devshell
''; '';
}; };
commands = [
{
name = "delete-merged";
category = "general commands";
help = "Delete merged branches";
command = ''
git fetch -p ; git branch -r | awk '{print $1}' | egrep -v -f - <(git branch -vv | grep origin) | awk '{print $1}' | xargs -r git branch -D
'';
}
];
packages = with pkgs; [ packages = with pkgs; [
cmake cmake
ghostscript ghostscript