Skip to content

Commit

Permalink
[nixexplore] use the append method to pass multiple patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
jgrewe committed Aug 5, 2020
1 parent 752d43e commit 89e6e55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nixio/cmd/nixexplore.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
2) type_or_name/prop_name: first looks for a matching section and within
those for matching properties.
Patterns are applied case-insensitive
and can be partial matches. Default: %(default)s
and can be partial matches. You can provide multiple patterns by calling the command like: `nixio-explore metadata -p "subject" -p "species" file1.nix file2.nix`
""".strip()

data_parser_help = """
Expand Down Expand Up @@ -557,7 +557,7 @@ def add_default_args(parent_parser):
def create_metadata_parser(parent_parser):
meta_parser = parent_parser.add_parser("metadata", help="Filter and display metadata", aliases=["mdata"],
description="Search for metadata items or display metadata (sub)trees.")
meta_parser.add_argument("-p", "--pattern", type=str, default=[], nargs="+", help=mdata_pattern_help)
meta_parser.add_argument("-p", "--pattern", type=str, action="append", help=mdata_pattern_help)
meta_parser.add_argument("-d", "--depth", type=int, default=-1,
help="maximum depth of metadata tree output, default is %(default)s, full depth")
add_default_args(meta_parser)
Expand Down

0 comments on commit 89e6e55

Please sign in to comment.