git-annex/doc/git-annex-findkeys.mdwn
Joey Hess 91ba0cc7fd
Revert "--json-exceptions"
This reverts commit a325524454.

Turns out this was predicated on an incorrect belief that json output
didn't already sometimes lack the "key" field. Since json output already
can when `giveup` was used, it seems unncessary to add a whole new
option for this.
2023-04-25 17:37:34 -04:00

75 lines
1.9 KiB
Markdown

# NAME
git-annex findkeys - lists available keys
# SYNOPSIS
git annex findkeys
# DESCRIPTION
Outputs a list of keys known to git-annex.
# OPTIONS
* matching options
The [[git-annex-matching-options]](1)
can be used to specify which keys to list.
By default, the findkeys command only lists keys whose content is
currently present. Specifying any of the matching options will override
this default behavior and match on all keys that git-annex knows about.
To list all keys, present or not, specify `--anything`.
To list keys whose content is not present, specify `--not --in=here`
* `--print0`
Output keys terminated with nulls, for use with `xargs -0`
* `--format=value`
Use custom output formatting.
The value is a format string, in which '${var}' is expanded to the
value of a variable. To right-justify a variable with whitespace,
use '${var;width}' ; to left-justify a variable, use '${var;-width}';
to escape unusual characters (including control characters)
in a variable, use '${escaped_var}'
These variables are available for use in formats: key, backend,
bytesize, humansize, keyname, hashdirlower, hashdirmixed, mtime (for
the mtime field of a WORM key).
Also, '\\n' is a newline, '\\000' is a NULL, etc.
The default output format is the same as `--format='${escapedkey}\\n'`
when outputting to the terminal, and otherwise `--format='${key}\\n'`
* `--json`
Output the list of keys in JSON format.
This is intended to be parsed by programs that use
git-annex. Each line of output is a JSON object.
* `--json-error-messages`
Messages that would normally be output to standard error are included in
the JSON instead.
* Also the [[git-annex-common-options]](1) can be used.
# SEE ALSO
[[git-annex]](1)
[[git-annex-find]](1)
# AUTHOR
Joey Hess <id@joeyh.name>
Warning: Automatically converted into a man page by mdwn2man. Edit with care.