diff --git a/papers/commands/list_cmd.py b/papers/commands/list_cmd.py index 02cd9a5..37946d2 100644 --- a/papers/commands/list_cmd.py +++ b/papers/commands/list_cmd.py @@ -48,7 +48,7 @@ def test_paper(query_string, p): if field in ['labels', 'l', 'tags', 't']: if value not in p.metadata['labels']: return False - elif field in ['authors', 'a']: # that is the very ugly + elif field in ['author', 'authors', 'a']: # that is the very ugly if not 'author' in p.bibentry.persons: return False a = False @@ -56,10 +56,9 @@ def test_paper(query_string, p): if value in p.last()[0]: a = True return a - else: - if field in p.bibentry.fields: + elif field in p.bibentry.fields: if value not in p.bibentry.fields[field]: return False - else: - return False + else: + return False return True diff --git a/papers/files.py b/papers/files.py index ad79abf..0af1cda 100644 --- a/papers/files.py +++ b/papers/files.py @@ -6,6 +6,7 @@ import yaml from . import ui from . import configs +from . import color try: import pybtex