(self, command, callback=None, show_status=False,
filter_empty_args=True, **kwargs)
| 215 | return log(settings=self.settings, *args, **kwargs) |
| 216 | |
| 217 | def run_command(self, command, callback=None, show_status=False, |
| 218 | filter_empty_args=True, **kwargs): |
| 219 | if filter_empty_args: |
| 220 | command = [arg for arg in command if arg] |
| 221 | if 'working_dir' not in kwargs: |
| 222 | kwargs['working_dir'] = self.get_working_dir() |
| 223 | if 'fallback_encoding' not in kwargs and self.active_view() and self.active_view().settings().get('fallback_encoding'): |
| 224 | kwargs['fallback_encoding'] = self.active_view().settings().get('fallback_encoding').rpartition('(')[2].rpartition(')')[0] |
| 225 | kwargs['console_encoding'] = self.settings.get('console_encoding') |
| 226 | |
| 227 | autosave = self.settings.get('autosave', True) |
| 228 | if self.active_view() and self.active_view().is_dirty() and autosave: |
| 229 | self.active_view().run_command('save') |
| 230 | if not callback: |
| 231 | callback = self.generic_done |
| 232 | |
| 233 | log('run command:', ' '.join(command)) |
| 234 | thread = CommandThread(command, callback, **kwargs) |
| 235 | thread.start() |
| 236 | |
| 237 | if show_status: |
| 238 | message = kwargs.get('status_message', False) or ' '.join(command) |
| 239 | sublime.status_message(message + 'wef') |
| 240 | |
| 241 | def generic_done(self, result): |
| 242 | self.log('generic_done', result) |
no test coverage detected