Extract output processing into its own function
Add with-editor-comint-mode