shell: Fix prompt to support [env] prepended to second line.

master
Pierre Neidhardt 2020-05-23 17:14:44 +02:00
parent 23329841ed
commit 56b62471db
1 changed files with 3 additions and 1 deletions

View File

@ -36,7 +36,7 @@ prefix arg shell buffer doesn't exists, create it and switch to it."
(set (make-variable-buffer-local 'comint-input-history-ignore)
(regexp-opt '("^#" "^ " "^cd ")))
(setq comint-prompt-regexp "^[^#$%>]*
[#$%>] *"))
[^#$%>]*[#$%>] *"))
(add-hook 'shell-mode-hook 'ambrevar/shell-setup)
@ -124,4 +124,6 @@ In normal circumstances this input is additionally filtered by
(ambrevar/shell-prompt-begin-position))))))
(define-key shell-mode-map (kbd "C-x n d") 'ambrevar/shell-narrow-to-prompt)
(define-key shell-mode-map (kbd "C-x M-O") 'comint-truncate-buffer)
(provide 'init-shell)