def minion_open(args): match_files = get_match_files(args) search_filter = args['<text>'] if len(match_files) > 0: (_, filename) = brain.select_file(match_files, args['--max']) brain.open_in_editor(filename) else: brain.display_output(title=search_filter, output=match_files)
def minion_last(args): ''' Open the most recently modified file. ''' filename = brain.get_last_modified(archives=args['--archives']) brain.open_in_editor(filename)