diff --git a/doc/qvm-tools/qvm-ls.rst b/doc/qvm-tools/qvm-ls.rst index 9867dd1d..f359ffc8 100644 --- a/doc/qvm-tools/qvm-ls.rst +++ b/doc/qvm-tools/qvm-ls.rst @@ -34,6 +34,8 @@ OPTIONS List only VM names one per line --raw-data Display specify data of specified VMs. Intended for bash-parsing. +--list-fields + List field names valid for --raw-data AUTHORS ======= diff --git a/qvm-tools/qvm-ls b/qvm-tools/qvm-ls index ce8e8609..824e0665 100755 --- a/qvm-tools/qvm-ls +++ b/qvm-tools/qvm-ls @@ -134,9 +134,17 @@ def main(): help="Display specify data of specified VMs.\ Intended for bash-parsing.") + parser.add_argument("--list-fields", dest="list_fields", + action="store_true", default=False, + help="List field names valid for --raw-data") + arguments = parser.parse_args () + if arguments.list_fields: + print '\n'.join(sorted(fields.keys())) + return + qvm_collection = QubesVmCollection() qvm_collection.lock_db_for_reading() qvm_collection.load()