git-annex-...hexpression(1)
π git-annex-matchexpression β checks if an expression matches β¨
okay so bestie, welcome to the git-annex-matchexpression page from the General Commands Manual π this one is a little plumbing-level icon and she is literally here to answer one question: does this expression match this data or not π
β¨ NAME β¨
git-annex-matchexpression β checks if an expression matches
πΈ SYNOPSIS πΈ
git annex matchexpression expression [data]
π¦ DESCRIPTION π¦
so this is a plumbing-level command, meaning she's not out here doing main character stuff, she's the backstage queen making everything else work π
you hand her a preferred content expression plus some data, and she checks whether the expression matches that data. that's it. that's the whole vibe π«Ά
her exit codes are giving very clear communication:
- exits
0if it matches β - exits
1if it does not match β - if not enough data was provided, she displays an error and exits with the special code
42π (yes, the answer to everything, but here it means "bestie you didn't give me enough to work with")
for example, this will exit 0:
git annex matchexpression "include=*.png and largerthan=1mb" --file=foo.png --size=10mb
like, she said yes, the vibes match π₯
π OPTIONS π
--file=β provide the filename to match against. ngl this is the chill one: the file does not have to actually exist on disk. she's just matching a name, no need to manifest it into reality π«--size=β tell her what the size of the file is. you can specify the size with any commonly used units, for example,"0.5 gb"or"100 KiloBytes". units are flexible, she's not gonna gatekeep π--key=β tell her what key is being matched against. this one is needed for matching expressions like"copies=N"and"metadata=tag=foo"and"present", which all need to look up the information on file for a key. so if your expression is nosy like that, she needs the key to go check π
many keys have a known size, and so --size is not needed when specifying such a key. cute, right? she already knows π
--largefilesβ parse the expression as an annex.largefiles expression, rather than a preferred content expression. same energy, different rulebook π--mimetype=β tell her what the mime type of the file is. only needed when using--largefileswith amimetype=expression. very "only if you're doing the specific thing" of it all π--mimeencoding=β tell her what the mime encoding of the file is. only needed when using--largefileswith amimeencoding=expression. same deal, matching pair energy π--explainβ display an explanation of what parts of the preferred content expression match, and which parts don't match. this is the receipts option, she will literally walk you through which parts ate and which parts did not π§Ύβ¨
also the git-annex-common-options(1) can be used. the classics, always welcome π
π SEE ALSO π
π AUTHOR π
Joey Hess <id@joeyh.name>
and that's the whole page bestie, no cap π this was the git-annex-matchexpression(1) page from the General Commands Manual β go forth and match some expressions, you absolute icon π¦β¨πΈ
π¦ where this page comes from
- alpine 3.24: git-annex-doc 10.20261026-r0 Β· AGPL-3.0-or-later
- arch rolling: git-annex 10.20261026-2 Β· AGPL-3.0-only
- debian trixie: git-annex 10.20250416-2 Β· AGPL-3.0-or-later
- debian trixie: git-annex 10.20250416-2+deb13u1 Β· AGPL-3.0-or-later
- epel 10: git-annex 10.20250320-1.el10_0 Β· AGPL-3.0-or-later
- fedora 43: git-annex 10.20250630-4.fc43 Β· AGPL-3.0-or-later
- fedora 43: git-annex 10.20250929-5.fc43 Β· AGPL-3.0-or-later
- fedora 44: git-annex 10.20260115-1.fc44 Β· AGPL-3.0-or-later
- nixos 26.05: git-annex 10.20260421
- nixpkgs unstable: git-annex 10.20260421
- opensuse-leap 16.0: git-annex 10.20250828-bp160.1.1 Β· AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
- opensuse-leap 16.0: git-annex 10.20250828-bp160.1.1 Β· AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
- opensuse-leap 16.0: git-annex 10.20250828-bp160.1.1 Β· AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
- ubuntu questing: git-annex 10.20250721-1
- ubuntu resolute: git-annex 10.20251029-1ubuntu1 Β· AGPL-3.0-or-later
- ubuntu stonking: git-annex 10.20251029-1ubuntu1 Β· AGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms