(text, state)
| 56 | Puppet_Master = PuppetMaster() |
| 57 | |
| 58 | def completer(text, state): |
| 59 | func = ['cls', 'clear', 'listeners', 'handlers', 'sessions', 'execute ', 'quiet', 'close', 'history', 'exit', 'BATCH-EXECUTE ', 'use '] + [ _['hash'] for _ in Puppet_Master.sessions ] |
| 60 | matches = [ _ for _ in func if _.startswith(text) ] |
| 61 | if state < len(matches): |
| 62 | return matches[state] |
| 63 | else: |
| 64 | return None |
| 65 | |
| 66 | readline.parse_and_bind('tab: complete') |
| 67 | readline.set_completer(completer) |
nothing calls this directly
no outgoing calls
no test coverage detected