home/git: add tmcommit script

This commit is contained in:
Oystein Kristoffer Tveit 2024-10-05 12:07:34 +02:00
parent 40d5a8af88
commit b3e782d716
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
2 changed files with 13 additions and 0 deletions

View File

@ -262,6 +262,14 @@ in
runtimeInputs = with pkgs; [ cfg.package coreutils ];
text = lib.fileContents ./scripts/git-tcommit.sh;
})
(pkgs.writeShellApplication {
name = "git-tmcommit";
runtimeInputs = with pkgs; [ cfg.package coreutils ];
text = lib.pipe ./scripts/git-tcommit.sh [
lib.fileContents
(builtins.replaceStrings ["hours" "tcommit"] ["minutes" "tmcommit"])
];
})
(pkgs.writeShellApplication {
name = "git-switch-interactive";
runtimeInputs = with pkgs; [ cfg.package fzf gnused coreutils ];

View File

@ -1,5 +1,10 @@
set -euo pipefail
if [[ $# -lt 1 ]]; then
echo "Usage: git tcommit [-]<hours>"
exit 1
fi
HOUR_SHIFT="$1"
shift