(self)
| 15 | self.shell = shell |
| 16 | |
| 17 | def vi_mode(self): |
| 18 | if (getattr(self.shell.pt_app, 'editing_mode', None) == EditingMode.VI |
| 19 | and self.shell.prompt_includes_vi_mode): |
| 20 | mode = str(self.shell.pt_app.app.vi_state.input_mode) |
| 21 | if mode.startswith('InputMode.'): |
| 22 | mode = mode[10:13].lower() |
| 23 | elif mode.startswith('vi-'): |
| 24 | mode = mode[3:6] |
| 25 | return '['+mode+'] ' |
| 26 | return '' |
| 27 | |
| 28 | |
| 29 | def in_prompt_tokens(self): |