def _getprefs(opt): 'completer for legacy options' opt = opt.replace('-', '_') if opt == 'colorscheme': return ('black', 'blue', 'green', 'cyan', 'red', 'magenta', 'yellow', 'white', 'normal') opt = _legacy_map.get(opt) if opt: return config.complete(*opt) return []
def _set_completer(args): opt = args[-1] opts = opt.split('.') if len(opts) != 2: return [] return config.complete(*opts)