Revision a313f923 kamaki/cli/history.py

b/kamaki/cli/history.py
41 41

  
42 42

  
43 43
class History(object):
44
    ignore_commands = ['config set', ]
45

  
44 46
    def __init__(self, filepath, token=None):
45 47
        self.filepath = filepath
46 48
        self.token = token
......
94 96

  
95 97
    def add(self, line):
96 98
        line = '%s' % line or ''
99
        bline = [w.lower() for w in line.split() if not w.startswith('-')]
100
        for cmd in self.ignore_commands:
101
            cmds = [w.lower() for w in cmd.split()]
102
            if cmds == bline[1:len(cmds) + 1]:
103
                log.debug('History ignored a command of type "%s"' % cmd)
104
                return
97 105
        line = line.replace(self.token, '...') if self.token else line
98 106
        try:
99 107
            with codecs.open(self.filepath, mode='a+', encoding='utf-8') as f:

Also available in: Unified diff