Skip to content

Commit

Permalink
Use add pattern args
Browse files Browse the repository at this point in the history
  • Loading branch information
tpwo committed Nov 7, 2023
1 parent 7c5e6e0 commit 2905318
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions src/pyzet/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,24 +96,7 @@ def _get_parser() -> tuple[ArgumentParser, dict[str, ArgumentParser]]:
subparsers.add_parser('add', help='add a new zettel')

edit_parser = subparsers.add_parser('edit', help='edit an existing zettel')
edit_parser.add_argument(
'-i',
'--ignore-case',
action='store_true',
help='case insensitive matching',
)
edit_parser.add_argument(
'-p',
'--pretty',
action='store_true',
help='use prettier format for printing date and time',
)
edit_parser.add_argument(
'--tags',
action='store_true',
help='show tags for each zettel',
)
edit_parser.add_argument('patterns', nargs='*', help='grep patterns')
add_pattern_args(edit_parser)

remove_parser = subparsers.add_parser('rm', help='remove a zettel')
add_pattern_args(remove_parser)
Expand Down

0 comments on commit 2905318

Please sign in to comment.