--anything and --nothing

Added --anything (and --nothing). Eg, git-annex find --anything will list
all annexed files whether or not the content is present. This is slightly
faster and clearer than --include=* or --exclude=*

While I can't imagine how --nothing will be used, preferred content
expressions already had anything and nothing, so might as well support both
as matching options as well.

Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
Joey Hess 2022-12-20 15:42:34 -04:00
parent 9d60385001
commit 0b2dd374d8
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
7 changed files with 60 additions and 2 deletions

View file

@ -378,6 +378,16 @@ fileMatchingOptions' lb =
<> help "match files smaller than a size"
<> hidden
)
, annexFlag (setAnnexState Limit.addAnything)
( long "anything"
<> help "match all files"
<> hidden
)
, annexFlag (setAnnexState Limit.addNothing)
( long "nothing"
<> help "don't match any files"
<> hidden
)
]
combiningOptions :: [AnnexOption]