1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-01 06:37:46 +00:00

Merge pull request #77 from zkat/patch-2

parse dates into datetimes
This commit is contained in:
Darren Schroeder 2021-07-25 16:50:38 -05:00 committed by GitHub
commit f226ee3dcf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,15 @@
# Creates a table listing the branches of a git repository and the day of the last commit
git branch | lines | str substring 2, | wrap name | insert "last commit" {
get name | each {
git show $it --no-patch --format=%as
}
} | sort-by "last commit"
def "git age" [] {
git branch |
lines |
str substring 2, |
wrap name |
insert last_commit {
get name |
each {
git show $it --no-patch --format=%as | str to-datetime
}
} |
sort-by last_commit
}