def _show_file(file_path, header_name='Shown'):
if file_path.startswith('file:/'):
file_path = file_path[6:]
click.secho("%s file: %s" % (header_name, file_path), fg='blue')
if not os.path.exists(file_path):
click.secho(' The file does not exist', fg='yellow')
else:
with open(file_path) as fd:
click.echo_via_pager(fd.read())
评论列表
文章目录