Evan Prodromou on Nostr: So, you learn something new every day. What I learned today is that the `sort` ...
So, you learn something new every day. What I learned today is that the `sort` command has a `-V` flag that lets you sort by *version* *order*. So, it correctly sorts v1.8.2 before v1.21.1. It even takes into account prerelease tags like -dev and -rc.1. I was able to use it for sorting our git version tags for CityCatalyst really nicely.
Published at
2025-05-14 22:04:06 UTCEvent JSON
{
"id": "7098079c52ccb830cbb65d9d30a52c07212b56890623cb4c8895fa1c692e487a",
"pubkey": "49381c98c05dee2e434c1c7d7622a9c39e065af9fcb1e3b9aac770d622d4078f",
"created_at": 1747260246,
"kind": 1,
"tags": [
[
"proxy",
"https://social.openearth.org/@evan/114508447529064910",
"web"
],
[
"proxy",
"https://social.openearth.org/users/evan/statuses/114508447529064910",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://social.openearth.org/users/evan/statuses/114508447529064910",
"pink.momostr"
],
[
"-"
]
],
"content": "So, you learn something new every day. What I learned today is that the `sort` command has a `-V` flag that lets you sort by *version* *order*. So, it correctly sorts v1.8.2 before v1.21.1. It even takes into account prerelease tags like -dev and -rc.1. I was able to use it for sorting our git version tags for CityCatalyst really nicely.",
"sig": "0e940bb3c7cd675ace31242a10898e287a23051755b0b3981d4293f4cbed5a02c4697eac15e2e0797d40bd425db55ef18803fe9eed9866d916dad72ea86f9e33"
}