pathspec-rb(1)
π NAME
pathspec-rb β the little test-your-pathspecs-against-an-actual-path bestie π
(this one lives in section 1 of the General Commands Manual, and yes it's the same name as the command, iykyk)
β¨ SYNOPSIS β¨
pathspec-rb [options] [subcommand] [path] <name> <path>
π¦ DESCRIPTION π¦
okay so. pathspec-rb is the companion tool that ships alongside the pathspec-ruby library, and its whole vibe is letting you β¨testβ¨ what match results the library would find using path specs. that's it, that's the job π«Ά
(fr fr, the original page spells the tool name pathspc-rb right here, and we're preserving that historic typo moment because facts are facts π)
you've got three modes of main-character energy:
- find all specs matching a path
- find all files matching specs
- verify that a path would match any spec
pick your fighter, bestie π
π SUB-COMMANDS π
specs_matchβ find all specs matching pathtreeβ find all files under path matching the specmatchβ check if the path matches any spec
π OPTIONS π
-f,--file <FILENAME>β load path specs from the file you pass in as the argument. lowkey important: if you don't give this option,pathspec-rbdefaults to loading.gitignore. so it's giving git by default, no cap.-t,--type [git|regex]β the type of spec you're expecting in the loaded specs file (the one from the-foption). defaults togit. switch it up if your specs are regex flavored β¨-v,--verboseβ only output if there are matches. not me gatekeeping output until something actually hits π
πΈ EXAMPLES πΈ
find all files ignored by git under your source directory:
$ pathspec-rb tree src/
list all spec rules that would match for the specified path:
$ pathspec-rb specs_match build/
check that a path matches at least one of the specs in a new version of a gitignore file:
$ pathspec-rb match -f .gitignore.new spec/fixtures/
π AUTHOR π
Gabriel Filion β the icon who made all this happen, periodt π
and that's the whole page bestie π¦ it's from the pathspec-rb(1) manual, page dated 2019, and we are obsessed with it. go test some pathspecs, you're gonna slay ππ
π¦ where this page comes from
- ubuntu stonking: ruby-pathspec 3.0.1-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms