git-annex-...hexpression(1)

πŸ“¦
version 10.20261026 Β· 4 versions
, in alpine 3.24, arch rolling, debian trixie, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’… 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 0 if it matches βœ…
  • exits 1 if 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 --largefiles with a mimetype= 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 --largefiles with a mimeencoding= 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 πŸ¦‹βœ¨πŸŒΈ