'add tag to current session'

def do_tag(self, arg):

    arg_parser = PupyArgumentParser(prog='sessions', description=self.do_tag.__doc__)
    arg_parser.add_argument('-a', '--add', metavar='tag', nargs='+', help='Add    tags')
    arg_parser.add_argument('-r', '--remove', metavar='tag', nargs='+', help='Remove    tags')
    arg_parser.add_argument('-w', '--write-project', action='store_true', default=False, help='save    config    to    project    folder')
    arg_parser.add_argument('-W', '--write-user', action='store_true', default=False, help='save    config    to    user    folder')
    try:
        modargs = arg_parser.parse_args(shlex.split(arg))
    except PupyModuleExit:
        return
    data = []
    clients = self.pupsrv.get_clients(self.default_filter)
    if (not clients):
        return
    for client in clients:
        tags = self.pupsrv.config.tags(client.node())
        if modargs.remove:
            tags.remove(*modargs.remove)
        if modargs.add:
            tags.add(*modargs.add)
        data.append({'ID': client.node(), 'TAGS': tags})
    self.config.save(project=modargs.write_project, user=modargs.write_user)
    self.display(PupyCmd.table_format(data))
