This reverts commit
f55ff7e7dcea67f544050c4a9508b3d1764d7c69.
Jani and Walter convinced me that this functionality is actually
useful, (to avoid replicating much of the logic of this script in
calling scripts).
metavar='PATH')
parser.add_argument('--list-views', help='list views',
action='store_true')
+parser.add_argument('--get-query', help='get query for view',
+ metavar='VIEW')
args = parser.parse_args()
for view in config['views']:
print(view['title'])
sys.exit(0)
+elif args.get_query != None:
+ for view in config['views']:
+ if args.get_query == view['title']:
+ print(' and '.join(view['query']))
+ sys.exit(0)
else:
# only import notmuch if needed
import notmuch