feat: git-lola and git-lol now has time

pull/20/head archive/plugins-need-update
pegasust 2023-09-24 22:01:51 -07:00
parent da666d64b2
commit fbbbd6510e
1 changed files with 34 additions and 0 deletions

View File

@ -74,6 +74,40 @@ in {
home.username = "hungtran";
home.homeDirectory = "/Users/hungtran";
home.stateVersion = "23.11";
repo.shells.shellAliases = {
git-lol = ''
git log --graph --decorate --color=always --abbrev-commit \
--pretty=format:'%C(auto)%h %d %C(cyan)%s %C(green)(%cr)%C(reset)' |
while IFS= read -r line; do
# Format the relative time
line=$(echo "$line" | sed -e 's/ minute/ min/' \
-e 's/ week/ wk/' \
-e 's/ hour/ hr/' \
-e 's/ month/ mo/' \
-e 's/ year/ yr/' \
-e 's/ ago//')
# Print the formatted line
echo "$line"
done | less -R
'';
git-lola = ''
git log --graph --decorate --color=always --abbrev-commit --all\
--pretty=format:'%C(auto)%h %d %C(cyan)%s %C(green)(%cr)%C(reset)' |
while IFS= read -r line; do
# Format the relative time
line=$(echo "$line" | sed -e 's/ minute/ min/' \
-e 's/ week/ wk/' \
-e 's/ hour/ hr/' \
-e 's/ month/ mo/' \
-e 's/ year/ yr/' \
-e 's/ ago//')
# Print the formatted line
echo "$line"
done | less -R
'';
};
}
];
};