def _init_edit(self):
"""
Inits the subparser that handles the edit command.
"""
def edit(core, args):
month = ' '.join(getattr(args, 'month', []))
core.edit(month)
usage = 'stl edit [month]'
desc = (
'lets you vim the right file'
)
subp = self.subparsers.add_parser('edit', usage=usage,
description=desc, help=desc)
subp.add_argument('month', nargs=argparse.REMAINDER,
help='the month you want to edit, e.g. oct 2016')
subp.set_defaults(func=edit)
评论列表
文章目录